Open spaceone opened 3 years ago
Hi @spaceone
yes you're right, example and examples are mutually exclusive
Example of the parameter’s potential value. The example SHOULD match the specified schema and encoding properties if present. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema that contains an example, the example value SHALL override the example provided by the schema. To represent examples of media types that cannot naturally be represented in JSON or YAML, a string value can contain the example with escaping where necessary.
Also see #126 - the error is in components/schemas/foo but the problem is not being reported there
I get:
for
since
openapi-spec-validator==0.3.0
. It succeeded to validate withopenapi-spec-validator==0.2.10
. If I remove one ofexample
orexamples
from#/components/parameters/foo
the validation succeeds.Does openapi define them as mutually exclusive? https://swagger.io/docs/specification/adding-examples/ doesn't seem to contain a mix. The swagger UI just sucks in displaying
examples
.