Forum Discussion
rajrahul9939
5 years agoOccasional Contributor
Hi HKosova
Thank you for your response.
I wanted to generate an example of JSON payload based on a method return type, same as swagger generate the response example.
Thank you
HKosova
Alumni
5 years agoYou can use the Swagger Inflector Java library, specifically its ExampleBuilder class, to generate JSON examples. Here's sample code: