From da040d7b02ab7e20f051736592e6b71b0b3c6cd6 Mon Sep 17 00:00:00 2001 From: Miguel Ortiz Date: Mon, 23 Sep 2019 20:12:03 -0500 Subject: [PATCH] Swagger implementation to document Rest APIs --- docker-compose.yml | 18 ++++++++++++++++++ env-example | 9 +++++++++ swagger-editor/Dockerfile | 3 +++ swagger-ui/Dockerfile | 3 +++ 4 files changed, 33 insertions(+) create mode 100644 swagger-editor/Dockerfile create mode 100644 swagger-ui/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index b55a9ca3c0..dbc010ca76 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1577,3 +1577,21 @@ services: - postgres volumes: - ${DATA_PATH_HOST}/Confluence:/var/atlassian/application-data + +### SWAGGER EDITOR ############################################ + swagger-editor: + build: ./swagger-editor + ports: + - ${SWAGGER_EDITOR_PORT}:8080 + networks: + - backend + +### SWAGGER UI ################################################ + swagger-ui: + build: ./swagger-ui + environment: + - API_URL=${SWAGGER_API_URL} + ports: + - ${SWAGGER_UI_PORT}:8080 + networks: + - backend \ No newline at end of file diff --git a/env-example b/env-example index 1148e3075d..51dc6878d3 100644 --- a/env-example +++ b/env-example @@ -725,6 +725,15 @@ PGADMIN_PORT=5050 PGADMIN_DEFAULT_EMAIL=pgadmin4@pgadmin.org PGADMIN_DEFAULT_PASSWORD=admin +### SWAGGER EDITOR ########################################### + +SWAGGER_EDITOR_PORT=5151 + +### SWAGGER UI ############################################### + +SWAGGER_API_URL=http://generator.swagger.io/api/swagger.json +SWAGGER_UI_PORT=5555 + ### SONARQUBE ################################################ ## docker-compose up -d sonarqube ## (If you encounter a database error) diff --git a/swagger-editor/Dockerfile b/swagger-editor/Dockerfile new file mode 100644 index 0000000000..f151dfe51f --- /dev/null +++ b/swagger-editor/Dockerfile @@ -0,0 +1,3 @@ +FROM swaggerapi/swagger-editor:latest + +LABEL maintainer="Miguel Ortiz " diff --git a/swagger-ui/Dockerfile b/swagger-ui/Dockerfile new file mode 100644 index 0000000000..0f8c6fd169 --- /dev/null +++ b/swagger-ui/Dockerfile @@ -0,0 +1,3 @@ +FROM swaggerapi/swagger-ui:latest + +LABEL maintainer="Miguel Ortiz "