You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
iop-openapi: fix schema details with ref to component
In OpenAPI, components schemas can be declared independently, and then
referred to to avoid duplication.
However, when referencing an existing schema, no other information can
be provided. This means that a field of a struct whose type has its own
schema must use a '$ref', but then cannot specify anything else,
especially no default value, no description, no constraints...
This is a pretty bad overlook from the OpenAPI spec:
�ihttps://github.com/OAI/OpenAPI-Specification/issues/1514
The proposed workaround is to use an untyped schema with all the
details, and push the $ref inside an allOf clause, on its own.
This is what is done in this commit. As you can see, this is pretty bad
semantically, and I can't really imagine expecting a client to properly
understand what it means, but that's the solution...
Change-Id: Ifdba5fe6a7a2494aa136ec3ea3f0952edd45d6d0
rip-it: 0c86011
0 commit comments