Open questionablequestion opened 3 years ago
It’s always been my understanding that $ref, being a “reference” rather than a concrete schema, cannot have siblings. I’m surprised to hear OAI 3.1 allows it - can you point me to the part of the spec where this nuance is described?
Hey @domaindrivendev , If I understand correctly, it's now possible. https://github.com/OAI/OpenAPI-Specification/releases/tag/3.1.0-rc0
And also there's test where there's description being used with ref https://github.com/OAI/OpenAPI-Specification/blob/main/tests/v3.1/pass/mega.yaml
To me as well, I see $ref being a reference rather than a concrete schema, like you said. I'm just looking for a way to add additional property for openapi-generator to be able to generate correct services. Is it possible now at all to add something like in my example? I tried using SchemaFilter but that's just changing reference object, not the one with $ref property.
Is there any way of adding manually format
and type
to the request body properties under paths?
When adding custom properties/description/example to property which has reference, Swashbuckle doesn't generate those extra properties in original property but in the reference.
It generates like this:
It should (?) generate like this:
OpenAPI 3.1 claims to be able to have siblings with $ref. Main problem I'm trying to solve with this is when using openapi-generator it requires to have some additional properties alongside $ref to generate correct services.
Thanks