cannot load spec.service: cannot decode OpenAPI3.1 spec from \"openapi.yaml\": oneOf constraint failed for ResponseOrReference with 0 valid results: map[Reference:required key missing: $ref Response:oneOf constraint failed for HeaderOrReference with 2 valid results: map[]]
This PR will check if they are really fields set on both objects. Only in this case the error is now thrown.
BTW: IsZero() bool isn't my favorite, but it is currently broadly used in many project to indicate if the object has content or not. Example gopkg.in/yaml.v3 defines also the interface IsZeroer.
Currently if you're using
$ref
in the response headers of OpenAPI3.1you'll receive an error like:
This PR will check if they are really fields set on both objects. Only in this case the error is now thrown.
BTW:
IsZero() bool
isn't my favorite, but it is currently broadly used in many project to indicate if the object has content or not. Examplegopkg.in/yaml.v3
defines also the interfaceIsZeroer
.