swagger-api / swagger-api/swagger-editor
Setting REACT_APP_DEFINITION_URL / REACT_APP_DEFINITION_FILE at build time has no effect
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 9.5k
- Forks
- 2.4k
- Avg merge
- 17h 15m
- Merged PRs (30d)
- 18
Description
The REACT_APP_DEFINITION_URL / REACT_APP_DEFINITION_FILE variables documented here have no effect / are not used within the codebase.
Local steps to reproduce:
$ REACT_APP_DEFINITION_URL=https://raw.githubusercontent.com/readmeio/oas-examples/refs/heads/main/3.1/yaml/train-travel.yaml npm run build:app
$ docker build . -f Dockerfile.unprivileged -t swaggerapi/swagger-editor:latest-unprivileged
$ docker run -d -p 8080:8080 swaggerapi/swagger-editor:latest-unprivileged
Then, visit http://localhost:8080 (clear the cache + app storage for the domain).
Observe that the AsyncAPI260StreetlightsYAML specification is always loaded - no matter the REACT_APP_DEFINITION_URL value.
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 src/plugins/editor-textarea/after-load.js and the environment-variable section of the README, then reproduce the reported npm build and Docker run steps. Trace how the built app selects its definition and verify behavior with REACT_APP_DEFINITION_URL and REACT_APP_DEFINITION_FILE set. Done means the configured definition is loaded instead of the always-loaded AsyncAPI260StreetlightsYAML specification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, javascript
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100