Forum Discussion
6 Replies
Sort By
- HKosovaSmartBear Alumni (Retired)
Hi rajrahul9939,
Just to clarify - do you want to generate an example of JSON payload based on a schema definition? Or do you need a mock server that would return sample responses? Or something else?
- rajrahul9939Occasional 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
- HKosovaSmartBear Alumni (Retired)
You can use the Swagger Inflector Java library, specifically its ExampleBuilder class, to generate JSON examples. Here's sample code:
Related Content
- 2 years agovericomms
- 2 months agoNicolaFilosa_SE
- 2 years agoTauras
Recent Discussions
- 3 days agoankkashyap
- 7 days agoankkashyap