Swagger 2.0 support for documenting asynchronous Responses

1,194 views
Skip to first unread message

DK

unread,
Sep 9, 2015, 8:20:30 AM9/9/15
to Swagger
Hi,

My JAX-RS API takes in a JSON request containing a callback URL. The API then returns a HTTP 202 Accepted Response.

Sometime later my JAX-RS app will create a HTTP Client and send another Response to the client via the provided callback URL.

Is there anyway in Swagger 2.0 I can document this callback response?
If not, is there any way Swagger spec can reference some static content describing this response?

Ron Ratovsky

unread,
Sep 9, 2015, 8:31:18 AM9/9/15
to Swagger
Right now Swagger does not describe asynchronous responses.

Can you explain what you mean by static content describing this response?
You can add documentation to the operation itself, and can always add vendor extensions to hold any sort of information you find relevant.

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

Dessie K

unread,
Sep 9, 2015, 9:57:56 AM9/9/15
to swagger-sw...@googlegroups.com
Thanks,

Is there a enhancement already open somewhere to add asynchronous response support? 

I was hoping I could add some static documentation after the responses section in the Swagger UI. In order to add some details and examples async responses.

I guess vendor extensions allows me to add extra info to the Swagger spec but I'd need to extend the Swagger UI myself to display it?



--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/Qc4omKSJ0E4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.

Dessie K

unread,
Sep 9, 2015, 9:59:31 AM9/9/15
to swagger-sw...@googlegroups.com
P.S. I'm using swagger-maven-plugin to auto-generate the Swagger 2 JSON from my JAX-RS code and then feeding this to Swagger UI

Ron Ratovsky

unread,
Sep 9, 2015, 12:24:06 PM9/9/15
to Swagger
I'm almost certain there is a feature request for it, but can't find it right now (could be wrong). Feel free to browse the issues at https://github.com/swagger-api/swagger-spec, and if you don't find anything, please open a new ticket. If you do open one, try to provide as many details as possible to help us consider it for a future version of the spec.

As for vendor extensions support, right now there's some support for parameter vendor extensions that you can see here - https://github.com/swagger-api/swagger-ui/pull/1401. If you'd like to extend it further and provide a PR, we'll be happy to accept it.
Reply all
Reply to author
Forward
0 new messages