If the file is not available in the /api directory the server will fall back to serving the /swagger_tools/swagger_editor/openapi.yaml specification that was created during image build. The Swagger Editor server's index.html has been rigged to serve the file openapi.yaml from its own directory ( /swagger_tools/swagger_editor). This happens when the container is first started and when it is re-started. On startup, the container starts the Swagger Editor server. Synchronisation of changes between Host and Container Notes on the Container - Read Before Opening 1.3.2.1. Create Host directory which to mount in the containerĪdjust Host paths above directory named api as you see fit. In this section a docker container with all that that is necessary to serve the Swagger Editor UI to the Host's Web Browser and convert between YAML and JSON openapi specifications will be created and started. Make such changes, to the small number of commands that this affects, as you need to make it work in a regular Linux environment. It is assumed in the text that Windows 10 with Debian WSL is the Host operating environment. Convert YAML specification documents to JSON and the vice versa.The intent of this document is to provide information on how to create a self-contained Docker container for API-First development using the mwczapski/swagger-editor:1.0.0 image hosted on Docker Hub. Use swagger-codegen to convert yaml to json and back Create the example openapi.yaml API Specification (OpenAPI 3.0.1) Notes on the Container - Read Before Opening Create Host directory which to mount in the container How to Use the Swagger Editor 3.0 Docker Container.How to Use the Swagger Editor 3.0 Docker Container
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |