Closed Yaytay closed 10 months ago
It is not clear how is the openapi obtained and how is it serialized, can you specify the original class(es), any config for swagger-core and how are you serializing it?
A common mistake is not setting the openapi31
flag when resolving an openapi spec out of code (via integration or using directly e.g. ModelResolver), another is using Yaml.prettyPrint()
instead of Yaml31.prettyPrint()
closing for now, please reopen with more details if you are still experiencing issues
When requesting openapi.json I'm getting this:
I'm expecting a type field under AuthConfig.
Putting this
in a ModelConverter outputs this:
I infer that types is null but type is set to "object".
Adding this:
to the ModelConverter makes the output the desired:
Given that getType() returns the correct value I'm guessing that something in the serializer for OpenAPI 3.1 is explicitly calling getTypes and something more clever is needed to handle type vs types (set types explicitly when setType is called?).