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

Add ability to generate all schemas with one call to the CLI #195

Closed
daviseford opened this issue Aug 23, 2023 · 0 comments · Fixed by #297 · May be fixed by #298
Closed

Add ability to generate all schemas with one call to the CLI #195

daviseford opened this issue Aug 23, 2023 · 0 comments · Fixed by #297 · May be fixed by #298
Assignees

Comments

@daviseford
Copy link

daviseford commented Aug 23, 2023

Hi, as a developer, I'd love to be able to use the CLI tool like so:

# Generates all schemas listed in the `openapi-codegen.config.ts` file
npx openapi-codegen gen *

# or, alternatively, maybe an empty argument for `gen` would mean "generate all"
npx openapi-codegen gen

# or, maybe
npx openapi-codegen gen --all

My project has a half dozen APIs added, each with their own generate command in my package.json. I'd love the ability to quickly update all of the APIs listed in the config file.

Currently, I manually accomplish this by doing something like this in my package.json, but you can see how it gets pretty verbose, pretty quickly

"gen:Api1": "npx openapi-codegen gen Api1",
"gen:Api2": "npx openapi-codegen gen Api2",
"gen:Api3": "npx openapi-codegen gen Api3",
"gen:Api4": "npx openapi-codegen gen Api4",
"gen:Api5": "npx openapi-codegen gen Api5",
"gen:Api6": "npx openapi-codegen gen Api6",
"generateAllApis": "npm run gen:Api1 && npm run gen:Api2 && npm run gen:Api3 &&  npm run gen:Api4 && npm run gen:Api5 && npm run gen:Api6" 
@daviseford daviseford changed the title Add ability to generate all schemas Add ability to generate all schemas with one call to the CLI Aug 23, 2023
@fabien0102 fabien0102 self-assigned this Feb 17, 2025
fabien0102 added a commit that referenced this issue Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants