-
Notifications
You must be signed in to change notification settings - Fork 197
Closed
Labels
Type: BugSomething isn't workingSomething isn't working
Description
Describe the bug
When linting with the rule no-invalid-media-type-examples. Redocly throws errors when it shouldn't.
More precisely it dosen't resolve the ref when validating the json schema.
To Reproduce
Steps to reproduce the behavior:
- Given this
redocly.yamlfile
extends:
- recommended
apis:
main:
root: ./openapi.yaml-
And this OpenAPI file(s)
example.zip -
Run this command with these arguments...
redocly lint -
See error
[1] paths/owner@{owner}@car/get.yaml:15:17 at #/responses/200/content/application~1json/examples/$ref/value
Example value must conform to the schema: type must be array.
13 | $ref: ../../components/schemas/Car.yaml
14 | examples:
15 | $ref: ./examples/get/200/_index-json.yaml
16 | '404':
17 | description: Not Found
referenced from paths/owner@{owner}@car/get.yaml:10:9 at #/responses/200/content/application~1json
Warning was generated by the no-invalid-media-type-examples rule.
Expected behavior
The error should not show as the example is correct. Futhermore if you bundle the api it correctly verifies the example.
OpenAPI description
OpenApi version 3.0.0. It is a simple API made to test this case
Redocly Version(s)
1.6.0
Node.js Version(s)
18
Additional context
Metadata
Metadata
Assignees
Labels
Type: BugSomething isn't workingSomething isn't working