-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat(swagger-editor): customizable codegen URLs #2910
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(swagger-editor): customizable codegen URLs #2910
Conversation
|
@antoineauger thanks a lot for contributing. We'll look into the PR ASAP. |
char0n
left a comment
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.
Thanks for contributing! Please have a look at my code review comments.
3fafd77 to
5774d33
Compare
5ad761a to
45fe767
Compare
Thanks for the review @char0n, this PR is way much simpler now. I think I addressed all your comments, could you have another look at it? 🙏🏻 |
char0n
left a comment
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 work! Changes look good! I'll have to some local testing with changes from this PR before the merge.
|
Testing went fine. All works as expected. THanks again! |
- Add support for REACT_APP_* environment variables for all codegen URLs - Update selectors to use env vars with fallback to default URLs - Document new environment variables in README.md - Maintains backward compatibility with default URLs Fixes swagger-api#5680
Description
This PR aims at allowing users to customize the URLs used by the Swagger Editor codegen features (e.g., Generate Server and Generate Client).
The URLs that can now be customized are:
For Docker users, this is made possible by the introduction of 3 new environment variables:
URL_SWAGGER2_GENERATORURL_OAS3_GENERATORandURL_SWAGGER2_CONVERTER, respectively.Motivation and Context
This PR can be interesting for:
Fixes #1488
Fixes #2688
Fixes #2127
/cc @fgreinacher @dlouzan
How Has This Been Tested?
For Docker env variables, created several docker containers with various values for env variables
URL_SWAGGER2_GENERATOR,URL_OAS3_GENERATORandURL_SWAGGER2_CONVERTER. Then logging on startup:Also tested that setting these variables to
nullwas disabling the Swagger Editor codegen features:Checklist
My PR contains...
src/is unmodified: changes to documentation, CI, metadata, etc.)package.json)My changes...
Documentation
Automated tests
🛠️ with ❤️ by Siemens