Hi,
You can add examples for body parameters using the @Example annotation – keep in mind it was added in 1.5.4 and you are using 1.5.0 so you’d need to upgrade before being able to use it. From: <[email protected]> on behalf of smk <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Friday, 29 July 2016 at 12:22 To: Swagger <[email protected]> Subject: Is there way to show the Example request parameter on the swagger UI? Hi , To add a user to the Db i have user Pojo class and a Post method. If i am not wrong in this case swagger automatically detect and bind the request to the user class and able show the example parameters that are sent in the UI like in the "add.png" Now if i have post method that takes a json value as the request than is there a way to display the example json like in the "add.png" so that i can just click and give some values. Currently its emply (Please look at taje.png). I am using swagger+jersey <dependencies> <dependency> <groupId>org.glassfish.jersey.containers</groupId> <artifactId>jersey-container-servlet-core</artifactId> <!-- use the following artifactId if you don't need servlet 2.x compatibility --> <!-- artifactId>jersey-container-servlet</artifactId --> </dependency> <dependency> <groupId>org.glassfish.jersey.media</groupId> <artifactId>jersey-media-moxy</artifactId> </dependency> <dependency> <groupId>io.swagger</groupId> <artifactId>swagger-jersey2-jaxrs</artifactId> <version>1.5.0</version> </dependency> <!-- https://mvnrepository.com/artifact/com.sun.jersey/jersey-servlet --> <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-servlet</artifactId> <version>1.19</version> </dependency> <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core --> -- 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.
