mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-09 12:47:48 +00:00
87 lines
2.4 KiB
JavaScript
87 lines
2.4 KiB
JavaScript
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`E2E lint assertions-custom-function-options 1`] = `
|
|
|
|
validating /openapi.yaml...
|
|
[1] openapi.yaml:20:16 at #/paths/~1pet~1findByStatus/get/summary
|
|
|
|
Custom message Should have at least 16 characters
|
|
|
|
18 | get:
|
|
19 | operationId: example
|
|
20 | summary: List of pets
|
|
| ^^^^^^^^^^^^
|
|
21 | tags:
|
|
22 | - foo
|
|
|
|
Error was generated by the operation-summary-length-custom assertion rule.
|
|
|
|
|
|
[2] openapi.yaml:20:16 at #/paths/~1pet~1findByStatus/get/summary
|
|
|
|
operation-summary-length assertion failed because the Operation summary didn't meet the assertions: Should have at least 16 characters
|
|
|
|
18 | get:
|
|
19 | operationId: example
|
|
20 | summary: List of pets
|
|
| ^^^^^^^^^^^^
|
|
21 | tags:
|
|
22 | - foo
|
|
|
|
Error was generated by the operation-summary-length assertion rule.
|
|
|
|
|
|
[3] openapi.yaml:31:23 at #/paths/~1pet~1findByStatus/get/responses/200/content/application~1json/schema/type
|
|
|
|
operation-summary-length-with-where assertion failed because the Schema type didn't meet the assertions: string should be equal integer
|
|
|
|
29 | application/json:
|
|
30 | schema:
|
|
31 | type: 'string'
|
|
| ^^^^^^^^
|
|
32 | '404':
|
|
33 | description: example description
|
|
|
|
Error was generated by the operation-summary-length-with-where assertion rule.
|
|
|
|
|
|
[4] openapi.yaml:36:16 at #/paths/~1pet~1findByStatus/post/summary
|
|
|
|
Custom message
|
|
- Should start with one of Create, Retrieve, Merge, Delete, List, Upsert, Update, Approve, Reject
|
|
- Should have at least 3 words
|
|
|
|
34 | post:
|
|
35 | operationId: example-post
|
|
36 | summary: summary looooong
|
|
| ^^^^^^^^^^^^^^^^
|
|
37 | tags:
|
|
38 | - foo
|
|
|
|
Error was generated by the operation-summary-length-custom assertion rule.
|
|
|
|
|
|
[5] openapi.yaml:36:16 at #/paths/~1pet~1findByStatus/post/summary
|
|
|
|
operation-summary-length assertion failed because the Operation summary didn't meet the assertions:
|
|
- Should start with one of Create, Retrieve, Merge, Delete, List, Upsert, Update, Approve, Reject
|
|
- Should have at least 3 words
|
|
|
|
34 | post:
|
|
35 | operationId: example-post
|
|
36 | summary: summary looooong
|
|
| ^^^^^^^^^^^^^^^^
|
|
37 | tags:
|
|
38 | - foo
|
|
|
|
Error was generated by the operation-summary-length 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.
|
|
|
|
|
|
`;
|