How to generate JSON example like Swagger example tab? #893
Answered
by
darrelmiller
Hamed Fathi (HamedFathi)
asked this question in
Q&A
|
How can I convert an Is it possible to generate examples after reading any kind of (complex) schemas (types)? Any idea? any suggestion?
|
Answered by
darrelmiller
Jun 28, 2022
Replies: 1 comment 1 reply
|
We don't currently have this feature. Emitting just JSON would be fairly easy, but emitting good data into the schema is considerably harder. I suspect the best approach would be to serialize the OpenAPISchema to JSON and then use a JSON Schema library that has already implemented the ability to emit examples. |
1 reply
Answer selected by
baywet
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


We don't currently have this feature. Emitting just JSON would be fairly easy, but emitting good data into the schema is considerably harder. I suspect the best approach would be to serialize the OpenAPISchema to JSON and then use a JSON Schema library that has already implemented the ability to emit examples.