swagger-api / swagger-api/swagger-ui

How to stop exploring json code in browser

Open
#8,968 3 comments 0 reactions 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

Hi ,
I am trying to run swagger docker container with custom json file with help of https://swagger.io/docs/open-source-tools/swagger-ui/usage/installation/ by
docker run -p 80:8080 -e SWAGGER_JSON=/foo/swagger.json -v /bar:/foo swaggerapi/swagger-ui

Here container works and site gets up .but my json file appears in swagger site like

image

when i click custom.json it's displaying my json code .

image

So how to stop display json code ?
Can you help

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 with the Swagger UI installation documentation linked in the issue and reproduce the supplied docker run command with the mounted custom.json file. Determine whether this behavior is expected for the configured file and document or test the supported way to load it; done means the custom specification opens as rendered API documentation rather than raw JSON.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, javascript
Domain
documentation, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.