However, we have a use case where we want to extract the example body from the schema definition of the body parameter for a path operation. Is there any sophisticated way to do this?
The swagger parser resolves all the references ( including circular ). We tried our own JSON parsing on the schema definition to generate example body, but that creates issues if there are circular references in the swagger definition. If we configure the swagger parser to ignore circular references, then the entire $ref containing circular reference is ignored and we cannot parse.
Can you guys suggest any sophisticated way or any open source tools which we can use to get the sample example body json for a path operation?