Skip to content

Commit

Permalink
fix: update make ui and make editor utilities
Browse files Browse the repository at this point in the history
Swagger UI now loads the minified OpenAPI spec.

Swagger Editor (latest version) doesn't support custom spec passed with envars or url parameters (see [swagger-editor/issues/4411](swagger-api/swagger-editor#4411)).

Refs: #2
  • Loading branch information
jenkin committed Oct 3, 2023
1 parent 44a8675 commit 1899a72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ SWAGGER_ED_PORT ?= 8092

ui:
echo "Swagger UI running at http://localhost:$(SWAGGER_UI_PORT)"
docker run --rm -p $(SWAGGER_UI_PORT):8080 -v $(PWD)/docs/nominatim.openapi.json:/tmp/nominatim.openapi.json -e SWAGGER_JSON=/tmp/nominatim.openapi.json swaggerapi/swagger-ui:$(SWAGGER_UI_VERSION)
docker run --rm -p $(SWAGGER_UI_PORT):8080 -v $(PWD)/docs/nominatim.openapi.min.json:/tmp/nominatim.openapi.json -e SWAGGER_JSON=/tmp/nominatim.openapi.json swaggerapi/swagger-ui:$(SWAGGER_UI_VERSION)
echo "Shutdown Swagger UI"

editor:
echo "Swagger Editor running at http://localhost:$(SWAGGER_ED_PORT)"
docker run --rm -p $(SWAGGER_ED_PORT):8080 -v $(PWD)/docs/nominatim.openapi.json:/tmp/nominatim.openapi.json -e SWAGGER_FILE=/tmp/nominatim.openapi.json swaggerapi/swagger-editor:$(SWAGGER_ED_VERSION)
docker run --rm -p $(SWAGGER_ED_PORT):8080 swaggerapi/swagger-editor:$(SWAGGER_ED_VERSION)
echo "Shutdown Swagger Editor"

hooks:
Expand Down

0 comments on commit 1899a72

Please sign in to comment.