swagger-api / swagger-api/swagger-ui

Not able to run multiple YAML files on swagger-ui

Open
#5,496 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Q&A (please complete the following information)
  • OS: [Linux]
  • Browser: [ALL]
  • Version: [latest]
  • Swagger-UI version: [latest]
  • Swagger/OpenAPI version: [ OpenAPI 3.0]
Content & configuration

I use the below command to run docker locally on my machine:

docker run -d -p 80:8080 -e SWAGGER_JSON=/foo/v210.yaml -v /home/mydir:/foo swaggerapi/swagger-ui

v210.yaml is the YAML file, I have 2 more of them. Now,

  1. I want a drop-down, to select the required version or
  2. I can combine all the spec of YAML files into one YAML file, and then a drop-down to select the required spec

Please let me know the docker command to do this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Docker image configuration and how the SWAGGER_JSON environment variable is handled for /foo/v210.yaml. Determine whether the requested behavior should support selecting among separate YAML files or combining them into one specification. Done means the chosen approach works in the local docker run setup and provides the requested spec selection.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, javascript
Domain
devops, documentation
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.