-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix(specs): correctly pass searchParams
to the request
#531
Conversation
✅ Deploy Preview for api-clients-automation ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✗ The generated branch has been deleted.If the PR has been merged, you can check the generated code on the |
158bb95
to
59e6ac0
Compare
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 ! Subtle but deadly type, it would be nice to have model extends in java but that's a bonus
searchTypeFacet: | ||
type: string | ||
enum: [facet] | ||
default: facet | ||
description: Perform a search query with `default`, will search for facet values if `facet` is given. | ||
|
||
searchTypeDefault: | ||
type: string | ||
enum: [default] | ||
default: default | ||
description: Perform a search query with `default`, will search for facet values if `facet` is given. |
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.
could this be the same enum but with a different default value ?
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.
Do you mean allowing both? It made the type to complicate to predict so I had to duplicate it
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.
you can't mix the type actually, if you're in a facet "query" you can't use the default type, so separate or literal "default" | "facet" is the only option I think
🧭 What and Why
🎟 JIRA Ticket: https://algolia.atlassian.net/browse/APIC-496
Changes included:
Fixes #528
This PR solves two problem of the generated clients:
params
parameters should be sent as a string (serialized) and not as an object1
This endpoint accepts both
facet
andhits
queries, which have distinct options while having some in common. We now provide a preciseallOf
/oneOf
to properly describe its usage.2
As the API accepts both
params
parameter and root level parameters, we now only leverage the root level parameters to prevent any extra logicNext
Documentation will be added via https://algolia.atlassian.net/browse/APIC-484
🧪 Test
CI :D