-
Notifications
You must be signed in to change notification settings - Fork 18
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(generators): factor utilsPackageVersion
for JavaScript
#511
Conversation
✅ Deploy Preview for api-clients-automation canceled.
|
baa4ce3
to
840a703
Compare
✗ The generated branch has been deleted.If the PR has been merged, you can check the generated code on the |
I tried #485 locally with a rebase it seems to work, but you can rebase your branch to ensure it @bodinsamuel |
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 ! The only field left is hasRegionalHost
, will be a bit more tricky without a lot of copy pasting :)
generators/src/main/java/com/algolia/codegen/cts/manager/JavaCtsManager.java
Outdated
Show resolved
Hide resolved
8a2c02f
to
8b92804
Compare
8b92804
to
86fcb3d
Compare
import type { Language } from './types'; | ||
import type { Language, LanguageConfig } from './types'; | ||
|
||
export function getClientsConfigField( |
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.
ahah how to overcomplicate thing, I agree that this is needed for Java but for ts we can just read json as is, but make sense for error checking
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.
Offers a way to avoid having a method for each field as @eunjae-lee suggested and also throws for all cases :D
🧭 What and Why
🎟 JIRA Ticket: -
Changes included:
When generating a new JavaScript client, the default
utilsPackageVersion
will match the client version (e.g. #485 tries to fetch0.0.1
of utils)This PR aims at applying the same logic added for
packageVersion
:utilsPackageVersion
inconfig/clients.config.json
getPackageVersion
logic to the whole client config to be able to retrieve other fields🧪 Test
CI :D