-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Both HTTP and HTTPS ports cannot be specified #214
Comments
That's a good point. |
👍 |
My opinion: We should make it possible to provide a list of hosts. Swagger should not be deterministic which host should be used for which scheme. |
Is it unreasonable to expect that https is always 443? |
Yes. The OP. |
I'm all for scheme: port type of mapping while swagger assumes it's http there is also wss in there and soon there is server push and so on with http2. the host can be assumed to be the same but a scheme represents more often than not a port. |
I agree - I think it would be insanely cool (almost) if one could open up for using swagger to describe APIs exposed over other protocols than HTTP(s) - (I'm primarily thinking CoAP, MQTT, WebSockets) |
And pigeons. |
@olensmar have you seen this project? https://github.com/swagger-api/swagger-socket Unbelievable potential with this. |
Just out of curiosity, when you say you want to expose the APIs on both http and https, you intend to accept both secured and unsecured connections? I think it defeats the purpose of having security ... ? |
Well, discussing security is out of the scope of this issue, isn't it? :-) I can't know for what purpose is the API on the p[articular port used, how the connection is allowed the access to and how it is secured. All I deal with is that the server offers both schemes. I can either document and test both of them with Swagger, or I can use only one there. I agree that unless more details are given, using |
Parent: #560. |
@olensmar you might be interested in the AsyncAPI specification: asyncapi.com. |
+1 |
I have an API exposed on custom ports:
When I test the API with https://editor.swagger.io, I can switch the protocol from HTTP to HTTPS on the page, but because the port is entered only once with the host together and used for both schemes, I cannot actually send the request to the correct HTTPS endpoint:
Why not adding an additional property configuring the HTTP and HTTPS ports?
The text was updated successfully, but these errors were encountered: