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

Select/Filter Tags to generate specific Services only #2017

Open
kosiakMD opened this issue Jan 30, 2024 · 1 comment
Open

Select/Filter Tags to generate specific Services only #2017

kosiakMD opened this issue Jan 30, 2024 · 1 comment

Comments

@kosiakMD
Copy link

Big thanks for the nice solution!
Is there is possible way to filter/select tags to create only specific Services per generation?
I use separations on 2 levels:

  1. Swagger: admin / clients
  2. Tag level for different clients: manager/public/etc - and here I used openapi generator (that one Java based) to have separation and selection, but would like to use your's solution instead
@mrlubos
Copy link
Collaborator

mrlubos commented Feb 29, 2024

@kosiakMD you can do this with @nicolas-chaulet/openapi-typescript-codegen by supplying a regular expression to the exportServices parameter. For example,

openapi --input openapi.json --output src/client --exportServices ^Foo

This will generate only services whose names start with "Foo"

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

No branches or pull requests

2 participants