Files
redocly-cli/__tests__/lint/assertions-ref-pattern-error/snapshot.js
2023-05-18 09:21:40 +02:00

83 lines
2.0 KiB
JavaScript

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`E2E lint assertions-ref-pattern-error 1`] = `
validating /openapi.yaml...
[1] openapi.yaml:12:3 at #/paths/~1pets
PathItem should contain ref to components/paths folder
10 | - url: http://petstore.swagger.io/v1
11 | paths:
12 | /pets:
| ^^^^^
13 | get:
14 | summary: List all pets
Error was generated by the ref-pattern-no-properties assertion rule.
[2] openapi.yaml:39:17 at #/paths/~1pets/get/responses/200/content/application~1json/schema
Response MediaType schema should contain ref to components/schemas folder
37 | application/json:
38 | schema:
39 | $ref: '#/components/schemas/Pets'
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40 | default:
41 | description: unexpected error
Error was generated by the ref-pattern assertion rule.
[3] components/paths/Owners.yaml:24:11 at #/get/responses/200/content/application~1json/schema
Response MediaType schema should contain ref to components/schemas folder
22 | content:
23 | application/json:
24 | schema:
| ^^^^^^
25 | properties:
26 | id:
Error was generated by the ref-pattern assertion rule.
[4] openapi.yaml:49:5 at #/paths/~1vets
PathItem should contain ref to components/paths folder
47 | $ref: components/paths/Owners.yaml
48 | /vets:
49 | $ref: components/Vets.yaml
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
50 | components:
51 | schemas:
Error was generated by the ref-pattern-no-properties assertion rule.
[5] components/Vets.yaml:23:11 at #/get/responses/200/content/application~1json/schema
Response MediaType schema should contain ref to components/schemas folder
21 | content:
22 | application/json:
23 | schema:
| ^^^^^^
24 | properties:
25 | id:
Error was generated by the ref-pattern assertion rule.
/openapi.yaml: validated in <test>ms
❌ Validation failed with 5 errors.
run \`redocly lint --generate-ignore-file\` to add all problems to the ignore file.
`;