A flexible JSON/YAML linter for creating automated style guides, with baked in support for OpenAPI v3.1, v3.0, and v2.0 as well as AsyncAPI v2.x.
2.43k
stars
235
forks
source link
Define Json Schema in OAS triggers no-$ref-siblings error #2531
Open
htdan opened 11 months ago
Describe the bug Tried to define Json Schema as part of API response with a Schema definition in the components section as follows (simplified).
"components": { "schemas": { "Schema": { "type": "object", "properties": { "title": { "type": "string" }, "$ref": { "type": "string", "format": "iri-reference" } } } } }
When run spectral with the OAS, the following error reported. It is a false positive?
To Reproduce
Environment (remove any that are not applicable):