You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Yes, the problem relates to the inability to fully document and interact with WebSocket endpoints within Swaggo-generated Swagger documentation. While Swaggo is excellent for documenting and testing standard RESTful APIs, it currently lacks native support for WebSocket protocol interactions. This creates a challenge when trying to document WebSocket endpoints, as Swagger UI cannot initiate a WebSocket connection or correctly display its behavior.
Describe the solution you'd like
I would like Swaggo to support WebSocket documentation more explicitly. This could include:
Native WebSocket Support: A way to declare endpoints as WebSocket connections in the Swagger documentation. This might involve using specific tags or parameters that indicate the endpoint upgrades the HTTP connection to a WebSocket.
Interactive Testing: Although Swagger UI is primarily for HTTP, it would be beneficial to integrate or link to tools that can establish WebSocket connections directly from the documentation interface, allowing developers to test WebSocket endpoints as easily as they do HTTP endpoints.
Clear Documentation Examples: Provide out-of-the-box templates or examples for documenting WebSocket endpoints, including details like required headers, authentication, and sample connection upgrades.
Describe alternatives you've considered
Currently, the alternative involves documenting WebSocket endpoints in Swagger as if they were standard HTTP GET or POST requests, then adding descriptive notes in the documentation to instruct users on how to manually upgrade the connection to a WebSocket. Another alternative is to use third-party tools like wscat or browser-based WebSocket clients to interact with the WebSocket endpoints, but this lacks integration with the Swaggo/Swagger ecosystem.
Additional context
WebSocket support is crucial for applications that rely on real-time communication, such as chat applications, live notifications, or real-time data feeds. Integrating this into Swaggo would greatly enhance its utility for developers working on these types of projects. Additionally, the growing popularity of WebSockets in modern web applications makes this feature increasingly relevant.
The text was updated successfully, but these errors were encountered:
I think this is related to an OpenAPI Spec issue. You can refer to: OpenAPI Specification. This tool generates OpenAPI documentation, so maybe you can point out where the OpenAPI spec supports WebSocket. That would be a good suggestion.
Is your feature request related to a problem? Please describe.
Yes, the problem relates to the inability to fully document and interact with WebSocket endpoints within Swaggo-generated Swagger documentation. While Swaggo is excellent for documenting and testing standard RESTful APIs, it currently lacks native support for WebSocket protocol interactions. This creates a challenge when trying to document WebSocket endpoints, as Swagger UI cannot initiate a WebSocket connection or correctly display its behavior.
Describe the solution you'd like
I would like Swaggo to support WebSocket documentation more explicitly. This could include:
Describe alternatives you've considered
Currently, the alternative involves documenting WebSocket endpoints in Swagger as if they were standard HTTP GET or POST requests, then adding descriptive notes in the documentation to instruct users on how to manually upgrade the connection to a WebSocket. Another alternative is to use third-party tools like wscat or browser-based WebSocket clients to interact with the WebSocket endpoints, but this lacks integration with the Swaggo/Swagger ecosystem.
Additional context
WebSocket support is crucial for applications that rely on real-time communication, such as chat applications, live notifications, or real-time data feeds. Integrating this into Swaggo would greatly enhance its utility for developers working on these types of projects. Additionally, the growing popularity of WebSockets in modern web applications makes this feature increasingly relevant.
The text was updated successfully, but these errors were encountered: