How to generate JSON example like Swagger example tab? #893
Unanswered
HamedFathi
asked this question in
Q&A
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. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can I convert an
OpenApiSchema
to a JSON example like what we have in Swagger?Is it possible to generate examples after reading any kind of (complex) schemas (types)? Any idea? any suggestion?
OpenApiSchema.ToJsonExample()
Beta Was this translation helpful? Give feedback.
All reactions