Browse Source

Swagger implementation to document Rest APIs

Miguel Ortiz 5 năm trước cách đây
mục cha
commit
da040d7b02
4 tập tin đã thay đổi với 33 bổ sung0 xóa
  1. 18 0
      docker-compose.yml
  2. 9 0
      env-example
  3. 3 0
      swagger-editor/Dockerfile
  4. 3 0
      swagger-ui/Dockerfile

+ 18 - 0
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

+ 9 - 0
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)

+ 3 - 0
swagger-editor/Dockerfile

@@ -0,0 +1,3 @@
+FROM swaggerapi/swagger-editor:latest
+
+LABEL maintainer="Miguel Ortiz <miguelortiz1994@outlook.com>"

+ 3 - 0
swagger-ui/Dockerfile

@@ -0,0 +1,3 @@
+FROM swaggerapi/swagger-ui:latest
+
+LABEL maintainer="Miguel Ortiz <miguelortiz1994@outlook.com>"