-
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(java): solve oneOf using a custom generator APIC-300 #125
Conversation
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.
small first pass
GG already!
generators/src/main/java/com/algolia/codegen/AlgoliaJavaGenerator.java
Outdated
Show resolved
Hide resolved
...lgoliasearch-client-java-2/algoliasearch-core/com/algolia/model/search/BaseSearchParams.java
Outdated
Show resolved
Hide resolved
Can you use the Same for #102 |
8dbfaf6
to
1f79eda
Compare
✔️ Deploy Preview for api-clients-automation canceled. 🔨 Explore the source changes: 06a6efd 🔍 Inspect the deploy log: https://app.netlify.com/sites/api-clients-automation/deploys/6221dc13a2922b0008bd736f |
eab6a7b
to
c6fdd47
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.
Only a change required on the JSON files, GG otherwise!!!
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.
GG!!
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.
Looks good!
Side note: we might want to have a small guide on how to handle custom generators, wdyt?
Good idea, I created a ticket for it. |
🧭 What and Why
🎟 JIRA Ticket: APIC-300
Because the templating is not enough to generate oneOf for java and maybe other clients, this PR creates a custom generator for java using the command:
And modified it to add the
setUseOneOfInterfaces(true)
(not accessible otherwise).Also experimented with adding
additionalProperties
from Java itself which mean we can add any object we want, like servers.An issue with
openapi-generator-cli
breaks custom generator and forces us to use the jar directly but this is getting fixed.PRs
Follow the stack !
Changes included:
search
package🧪 Test