Skip to content

How to run swagger-ui with local code changes AND my own swagger.json? #3675

Closed
@HaraldNordgren

Description

@HaraldNordgren

The Readme specifies that Swagger-UI can be run with your own file like this

docker run -p 80:8080 -e SWAGGER_JSON=/foo/swagger.json -v /bar:/foo swaggerapi/swagger-ui

which works I if I translate it to

docker build . -t swagger-ui-local && \
  docker run -p 80:8080 -e SWAGGER_JSON=/foo/my-file.json -v $PWD:/foo swagger-ui-local

This, however, ignores my local changes.

I can run my local changes with

npm run dev

but I can't figure out how to get this dev server to run anything else than the Petstore example.

Can anyone help me combine the two, so I can run swagger-ui with local code changes AND my own swagger.json?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions