Closed Yaytay closed 2 years ago
from your outcome above I suspect that the spec gets serialized using the 3.0 Yaml
class instead of the 3.1 Yaml31
. Can you share some more details about your scenario (how are you integrating Swagger, how do you serialize the spec, etc)?
Please see also this comment for some details about 3.0 Schema type
vs 3.1 types
Hmm, well now it's working and I don't know why :( I suspect I had invalid combinations of dependencies somewhere. I'm going to close this issue, but I'd be really grateful if you could give me the actual link to type vs types differences.
It's working for me now.
Updated link to related comment
Thank you. I had to do more digging on this and it was entirely my fault. I have to initiate the rendering of the schema myself (because the documented endpoints are Resteasy but the OpenAPI endpoint is Vert.x) and I hadn't picked up on the need to use a different class for 3.1.0. Your first comment pointed me in the right direction.
I'm working on a pretty basic REST API with quite a complex object model. The only differences between the output when:
openAPI31(Boolean.TRUE)
andopenAPI31(Boolean.FALSE)
are:An example subset from OpenAPI 3.0.1:
and from 3.1.0:
Is this something a bug in the OpenAPI library, or am I missing something on my side?
It's not just string "types" that are missing, they've all gone.
I have specified dependencies on swagger-jaxrs2-jakarta:2.2.6 and swagger-annotations-jakarta:2.2.6.
Thanks.