Contributions
Re: Swagger Editor and Supporting Services
Helloponelat, after speaking to my peer, the SSL error turned out to be a NAT configuration issue which we were able to take care of, thank you. We now have instances of the supporting services listed below running in our test environment using the Docker containers from Docker Hub: swaggerapi/swagger-validator-v2 swaggerapi/swagger-converter However, I am still facing some challenges with these services when requesting validation/conversion to an API definition that is hosted on the same server. While the samplehttps://petstore.swagger.io/v2/swagger.jsonvalidates with our instance of the validator badge and converts properly to OpenAPI 3.0 with the converter, I can't seem to validate any APIs definitions that are hosted on the same server, albeit different ports, for example, the following succeeds: https://example.test.host.com:8050/validator/?url=https://petstore.swagger.io/v2/swagger.json,and https://example.test.host.com:8051/api/convert/?url=https://petstore.swagger.io/v2/swagger.json But, the following request against an internal API's definition hosted on the same server, fails to validate and convert: https://example.test.host.com:8050/validator/?url=https://example.test.host.com:8052/api/swagger.json (fails validation) https://example.test.host.com:8051/api/convert/?url=https://example.test.host.com:8052/api/swagger.json(fails conversion) The validator badge fails with the error "Can't read from file https://example.test.host.com:8052/api/swagger.json"with an HTTP status code of 400 Bad Request. The converter fails with something similar: "Unable to read location 'https://example.test.host.com:8052/api/swagger.json'" with the same status. Here is a bit more detail on our current setup and where we are trying to go with this: We are trying to implement Swagger Opensource tools using the Dockerized services available in Docker Hub to view and author OpenAPI compliant definition files. So far, we have an instance of Swagger UI running to serve as our API catalog accomplished by using the URLS environment variable as described in the documentation (https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md) with URLs to some of our internal APIs that sit on the same server but on different ports. This works great and the UI has a drop down list to choose the APIs definition to render. Our next goal is to point our instance of Swagger UI to validate with our local validator instance since it's currently disabled. The Swagger Editor's File > Import URL works great with the addresses to the internal API's definition as well, but although we were able to configure the Editor to point to our internal converter, the converter is unable to read definition as described above. One difference I noticed between the two containers that worked for us, Swagger UI and Editor and the two that are not working for us, is the port configuration the containers are configured with. While Swagger UI and Editor have the following configuration: PORTS NAMES 80/tcp, 0.0.0.0:aaaa->8080/tcp swagger-ui 80/tcp, 0.0.0.0:bbbb->8080/tcp swagger-editor The validator and converter look as follows: PORTS NAMES 0.0.0.0:cccc->8080/tcp swagger-validator 0.0.0.0:dddd->8080/tcp swagger-converter Any ideas on the reason the validator/converter can't read internally exposed definitions would be greatly appreciated. Thanks again!2.1KViews0likes1CommentRe: Swagger Editor and Supporting Services
So far, this works great locally. Thank you so much for the replyponelat! However, when attempting to deploy this behind an HTTPS connection, I get the following 'Secure Connection Failed' Error code: SSL_ERROR_RX_RECORD_TOO_LONG Is there anything special I need to do to instantiate the following containers in order to avoid this error: swaggerapi/swagger-validator-v2 swaggerapi/swagger-converter Thanks again!2.2KViews0likes3CommentsSwagger Editor and Supporting Services
Hello, I have been successful in running Docker containers for Swagger UI and Swagger Editor, from swaggerapi/swagger-ui and swaggerapi/swagger-editor (pulled from DockerHub), respectively. This approach works well, but I quickly realized that Swagger Editor reaches out to a few other supporting services, at least: https://generator.swagger.io https://generator3.swagger.io https://converter.swagger.io/api/convert I know there are Docker containers for these as well, but I haven't been able to configure the Swagger Editor container to use them instead of reaching out to swagger.io. I rather avoid sending any API definitions to an external network. What are your recommendations? Much appreciated!Solved2.3KViews0likes5Comments