You can do that in various ways, all controlled by the annotations (adding 
types, manipulating them, adding examples).

However, you can’t do most with 1.5.4 (it’s an old version) and 
swagger-maven-plugin may not support all these new options (whereas 
swagger-core does).

 

 

 

From: <[email protected]> on behalf of Patrick Verboom 
<[email protected]>
Reply-To: "[email protected]" 
<[email protected]>
Date: Wednesday, 18 January 2017 at 1:37
To: Swagger <[email protected]>
Subject: swagger jax-rs post json body as string

 

hi,

I am currently using swagger 1.5.4 with the swagger-maven-plugin to generate my 
api docu from my jax-rs services. It is all working fine and the docu is being 
generated. 
I have problems with the corner cases where swagger is unable to determine the 
model from the request/response. In my particular case I use MongoDB. 
I use the org.bson.Document as a response and in requests I take the body as a 
string, validate it and convert it into a org.bson.Document.
I would like to add json examples and the json schema definition to the swagger 
documentation. 
Is this possible and when yes how?

Kind regards,
Patrick

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.


-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to