-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(javascript): expose models
#252
Conversation
✔️ Deploy Preview for api-clients-automation canceled. 🔨 Explore the source changes: 966c8cb 🔍 Inspect the deploy log: https://app.netlify.com/sites/api-clients-automation/deploys/6230514bf9ce020008834f03 |
I forgot to fix the |
✔️ codegen triggered on commit 966c8cb6a07b1f0dff4d815622a5323bfe006161. 🔍 Browse the generated code on branch generated/feat/javascript-expose-models: eca3f9757822f460bef175c837775b3fea0321b6. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvement !
@@ -29,7 +31,7 @@ client.addUserAgent('algoliasearch node playground', '0.0.1'); | |||
|
|||
async function testAlgoliasearch() { | |||
try { | |||
const res = await client.search({ | |||
const res: SearchResponse = await client.search({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you need to type here ? It can only return SearchResponse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was mostly to test if it worked, and since we don't have a way to ensure it's still exposed, I've left it here
@@ -0,0 +1,5 @@ | |||
{{#models}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised this works ahah
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me too, sometimes the generator have really easy features
🧭 What and Why
🎟 JIRA Ticket: https://algolia.atlassian.net/browse/APIC-374
Changes included:
This PR updates the JavaScript template to use the
models.ts
file to expose generatedmodels
at the root of the package.🧪 Test