I would like to know if there's a way to input multiple files to the environment variable SWAGGER_JSON variable in Docker that will generate something like a drop list in the UI or something.
For now I have something similar to this on my Dockerfile:
ENV SWAGGER_JSON "/docs/doc1.yaml"
And would like to know if there's a structure that maybe looks like:
ENV SWAGGER_JSON "['/docs/doc1.yaml','/docs/doc2.yaml']"
This isn't currently possible, but we can add it 馃槃
Once #4965 is merged, you can do this with the following..
Given a directory foo with one.yaml and two.yaml inside of it:
docker run -e
\ URLS="[ { name: \"one\", url: \"/foo/one.yaml\"}, { name: \"two\", url: \"/foo/two.yaml\" } ]"
\ -v /Users/kyle/Code/ui/bar:/usr/share/nginx/html/foo -p 8080:8080 swagger-api/swagger-ui
How can the same environment variable be set in the docker compose. when I tried it is giving services.swaggerapp.environment contains an invalid type, it should be an object, or an array
@manjunathrvce this issue is resolved, please open a new one!
Most helpful comment
Once #4965 is merged, you can do this with the following..
Given a directory
foowithone.yamlandtwo.yamlinside of it: