Skip to content
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

chore: simplify openapi #471

Merged
merged 10 commits into from
May 5, 2022
Merged

chore: simplify openapi #471

merged 10 commits into from
May 5, 2022

Conversation

millotp
Copy link
Collaborator

@millotp millotp commented May 5, 2022

🧭 What and Why

Ticket: APIC-474

The fix package is now deprecated in favor of the real openapi-generator-cli package which now contains the fix for custom generators.

Use this opportunity to simplify our openapitools.json file and put it in the config folder.
When we generate code or CTS, we now generate the final openapitools.json file from the config one, and feed it to openapi-generator-cli. This way we can have minimal information in our config file.

Move all the server setup to the generators instead of openapitools, to have better control.

🧪 Test

CI

@millotp millotp self-assigned this May 5, 2022
@netlify
Copy link

netlify bot commented May 5, 2022

Deploy Preview for api-clients-automation canceled.

Name Link
🔨 Latest commit 89c07e0
🔍 Latest deploy log https://app.netlify.com/sites/api-clients-automation/deploys/6273b7aec36b9a000810b35b

@millotp millotp changed the title Chore/simplify openapi chore: simplify openapi May 5, 2022
@algolia-bot
Copy link
Collaborator

algolia-bot commented May 5, 2022

✗ The generated branch has been deleted.

If the PR has been merged, you can check the generated code on the main branch.

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks really nice!

scripts/common.ts Outdated Show resolved Hide resolved
scripts/pre-gen/generateOpenapitools.ts Outdated Show resolved Hide resolved
scripts/pre-gen/generateOpenapitools.ts Show resolved Hide resolved
[] as string[]
);
const AVAILABLE_CUSTOM_GEN = Object.values(clientsConfig)
.map((gen) => ('customGenerator' in gen ? gen.customGenerator : null))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧙🏼

"topLevelDomain": "com",
"utilsPackageVersion": "0.2.0"
"utilsPackageVersion": "0.2.0",
"hasRegionalHost": true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

best option

@millotp millotp requested a review from shortcuts May 5, 2022 11:53
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love it!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants