|
Hi I have an API endpoint which expects a request with something like the following structure: { I would like to provide validation for the outer structure but also for the string JSON within my JSON array. Right now when I try to validate, my string JSON is never deserialized into something I can validate against (throwing a body cast error), but if I specify it as a string the validator will not attempt to deserialize the string and assume everything is valid. Is there a way of having the validator attempt to deserialize the string through my OpenAPI schema or is this something that is not supported? |
Answered by
p1c2u
Feb 21, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @jjimene1
it is possible to define specification for such case in OpenAPI 3.1.1 by using
contentMediaTypeandcontentSchema. Although the library currently doesn't support it.