A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI (v3.1, v3.0, and v2.0), Arazzo v1.0, as well as AsyncAPI v2.x.
Expected behavior
Replacing the $ref in A.internal with type: number produces an error:
24:27 error oas3-valid-schema-example "external" property type must be object paths./.post.requestBody.content.application/json.schema.example.external
But this doesn't happen for an object as in the example above.
Describe the bug Examples for recursive object types aren't validated.
To Reproduce
./spectral lint api.yml
.Expected behavior Replacing the
$ref
inA.internal
withtype: number
produces an error:But this doesn't happen for an object as in the example above.
Environment: