Environment variable to import json or yaml
See original GitHub issueQ | A |
---|---|
Bug or feature request? | feature request |
Which Swagger/OpenAPI version? | |
Which Swagger-Editor version? | |
How did you install Swagger-Editor? | docker |
Which browser & version? | Chrome Version 62.0.3202.89 (Official Build) (64-bit) |
Which operating system? | Ubuntu |
Current Behavior
Able to install docker image and run using docker run -d -p 80:8080 swaggerapi/swagger-editor
Possible Solution
Should be able to import json on start
docker run -d -p 80:8080 -e SWAGGER_JSON='./swagger.json' swaggerapi/swagger-editor
Context
Trying to start fresh with provided json instead of starting editor and importing everytime. I am limited to docker only run
Issue Analytics
- State:
- Created 6 years ago
- Reactions:33
- Comments:10 (3 by maintainers)
Top Results From Across the Web
How to Set Up Environment Variables using JSON files with ...
In this article, I'll take the result of those tutorials as a starting point to set up environment variables using JSON files.
Read more >How to use a YAML file or environment variables to populate ...
In most cases, we suggest using a config variables YAML file. YAML files make variables more visible, easily editable, and allow for modularization...
Read more >Using JSON to declare variables in a YAML - Stack Overflow
I have a JSON called config.json and I would like to use the values it has to shit variables in a YML. This...
Read more >Use environment variables in the configuration - Elastic
You can specify complex objects, such as lists or dictionaries, in environment variables by using a JSON-like syntax. As with JSON, dictionaries and...
Read more >Variables - Serverless Framework
Reference & load variables from environment variables; Reference & load variables from CLI ... You can reference variables in other YAML or JSON...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry, I’ve been away from this almost a year and still seeing this open. I’ve opened a PR that fixes it. Please approve
Any update on this? It would be really nice to have this, since Swagger UI comes with it already.
@codeasashu, the proposed command should probably include a volume mount like
-v $(pwd):/tmp
and-e SWAGGER_JSON=/tmp/swagger.json
(oropenapi.yaml
) would then reference that path.