From e97d7f2af7f8aad923ba53d7fc2c72ed477acd08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ste=CC=81phane=20Klein?= Date: Fri, 24 Nov 2017 15:24:11 +0100 Subject: [PATCH] Add docker-compose to test Swagger documentation locally --- README.md | 12 +++++++++--- docker-compose.yml | 10 ++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 docker-compose.yml diff --git a/README.md b/README.md index 7861733..6c9fcb9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ -# Gemnasium API documentation +# Gemnasium REST API v3 documentation -This repo host the Gemnasium API documentation. +## Start swagger on localhost -The documentation is currently written with the [API Blueprint](http://apiblueprint.org/) format and is available on [Apiary.io](http://docs.gemnasium.apiary.io/). +``` +$ docker-compose up -d +$ echo -e "\nBrowse to http://`docker-compose port swagger 8080`\n" + +Browse to http://0.0.0.0:32782 + +``` diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..0da7894 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: '2' +services: + swagger: + image: swaggerapi/swagger-ui:latest + environment: + API_URL: openapi3.yaml + ports: + - 8080 + volumes: + - ./openapi3.yaml:/usr/share/nginx/html/openapi3.yaml