

It is no requirement to use tomcat or anything else I stated above. If my current approach is totaly wrong and there is a completely different approach, please tell me.
How to use swagger editor and ui software#
In today’s software realm, there are no systems running online without exposing an API. It simplifies the process of writing APIs by notches, specifying the standards & providing the tools required to write beautiful, safe, performant & scalable APIs. path: './api/paths/path1.yaml' basePath: 'undefined'".Īside from this error. Swagger is a set of open source tools for writing REST-based APIs.

"$ref: './api/paths/path1.yaml'" to reference the the path1.yaml file from BOTH Swagger UI and Swagger Editor, but I get the Error:Ĭould not resolve reference: Tried to resolve a relative URL, without having a basePath. The current folder structure looks like this: swagger_ui So my current approach is to deploy Swagger Editor alongside Swagger UI in my tomcat. Which makes sense, as I only imported root.yaml and the path and schema files are stored on a completely different server. Now I get a bunch of errors saying the URLs to "paths" and "schemas" can not be resolved. In Swagger Editor, I click on File -> Import URL and import my root.yaml file. Now I wanted to have a simple way of editing the files using Swagger Editor. Now all CORS errors were gone, as my references are now all within the same origin (eg. The folder structure of the artifact looked like this: swagger_ui To circumvent them, I simply deployed the Swagger-UI Folder, with my projects yaml files inside it as artifact to my tomcat. That works until the point that I split the yaml into multiple files, as I got CORS errors then. Documenting the whole REST-API in one single yaml file would be too much, so I would like to split it into several yaml files.įirst I tried to use Swagger UI simply by downloading it an opening its index.html. Another advantage is that we can find it integrated to popular, powerful tools such as those of WSO2. Below, we have listed some of the key features of the editor.
How to use swagger editor and ui download#
You can use the Swagger Editor through the browser, download to run locally, or use a host version such as SwaggerHub. I would like to use swagger for our project, which is rather big. With Swagger, documentation can be used directly to automate API-dependent processes. Swagger Editor is a browser-based editor where you can write and edit API documentation and OpenAPI specifications.
