swagger-api / swagger-api/swagger-editor
Allow to set customizable codegen URLs at build time
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 9.5k
- Forks
- 2.4k
- Avg merge
- 17h 15m
- Merged PRs (30d)
- 18
Description
Hi there,
With the switch to React and the release of swagger-editor v5, we lost the ability to configure some codegen URLs.
For instance, for users that had their own Swagger generator server, it was previously possible to set URL_SWAGGER2_GENERATOR, URL_OAS3_GENERATOR or even URL_SWAGGER2_CONVERTER - see https://github.com/swagger-api/swagger-editor/pull/2910/files
Since we cannot do this at runtime now (due to the limitations mentioned in the README), I think it would still be nice to allow users to configure this at build time.
E.g., following the former syntax that we had. In order to disable the OpenAPI 2.x to OpenAPI 3.x convert feature, we would do:
REACT_APP_SWAGGER2_CONVERTER_URL=null npm run build:app
Would the maintainers of this project be open to some PR(s) that would go that route?
/cc @char0n since you initially reviewed https://github.com/swagger-api/swagger-editor/pull/2910
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the build:app command and the README section describing environment-variable limitations, then compare the former configuration in pull request 2910. The work is complete when build-time variables can configure the listed codegen and converter URLs, including disabling the converter with the shown null value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- build-system, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100