question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Environment variable to import json or yaml

See original GitHub issue
Q 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:closed
  • Created 6 years ago
  • Reactions:33
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
codeasashucommented, Nov 12, 2019

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

6reactions
jrypelcommented, Jul 4, 2019

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 (or openapi.yaml) would then reference that path.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found