You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
components:
responses:
200Ok:
description: The response body for a Ok response.content:
application/json:
schema:
$ref: "#/components/schemas/Error"examples:
default:
$ref: "../examples/examples.yml#/components/examples/200Ok"400BadRequest:
description: The response body for a Bad Request error. One or more parameters have an invalid value.content:
application/json:
schema:
$ref: "#/components/schemas/Error"examples:
default:
$ref: "../examples/examples.yml#/components/examples/400BadRequest"500InternalServerError:
description: The response body for an Internal Server error.content:
application/json:
schema:
$ref: "#/components/schemas/Error"examples:
default:
$ref: "../examples/examples.yml#/components/examples/500InternalServerError"schemas:
Error:
type: 'object'additionalProperties: falseproperties:
code:
type: integerformat: int32example: 10title:
type: 'string'description: A machine-friendly identifier for the code.example: NOT_FOUNDdetail:
type: 'string'example: Resource not found for id 12345required:
- code
- title
- detail
examples.yml
components:
examples:
200Ok:
summary: Okdescription: The following example shows the response body for a Ok response.value:
code: 200title: Okdetail: The request was successful400BadRequest:
summary: Bad Requestdescription: The following example shows the response Bad Request body when the provided parameters were invalid.value:
code: 400title: Bad Requestdetail: One or more parameters have an invalid value500InternalServerError:
summary: Internal Server Errordescription: The following example shows the Internal Server Error response body.value:
code: 500title: Internal Server Errordetail: Server could not handle the request properly
Expected behavior
The expected behaviour should be that no errors or warnings are found, although these are show
5:11 warning oas3-examples-value-or-externalValue Examples must have either "value" or "externalValue" field. components.examples.200Ok
8:13 error oas3-valid-media-example "value.value" property must exist components.examples.200Ok.value
13:19 warning oas3-examples-value-or-externalValue Examples must have either "value" or "externalValue" field. components.examples.400BadRequest
16:13 error oas3-valid-media-example "value.value" property must exist components.examples.400BadRequest.value
21:28 warning oas3-examples-value-or-externalValue Examples must have either "value" or "externalValue" field. components.examples.500InternalServerError
24:13 error oas3-valid-media-example "value.value" property must exist components.examples.500InternalServerError.value
Additional context
To test this I created a function which logs when a $ref is being validated following the same given patterns as the oas3-examples-value-or-externalValue rule.
The text was updated successfully, but these errors were encountered:
Describe the bug
When reusing objects after reaching a certain depth the $refs stop being resolved and instead the $ref itself is linted.
To Reproduce
asyncapi.yml
test7.yml
all the testX.yml follow the same structureresponses.yml
examples.yml
Expected behavior
The expected behaviour should be that no errors or warnings are found, although these are show
Additional context
To test this I created a function which logs when a $ref is being validated following the same given patterns as the oas3-examples-value-or-externalValue rule.
The text was updated successfully, but these errors were encountered: