add tests for $and and $description #59
check.yaml
on: push
code-quality
30s
code-style
10s
Annotations
5 errors and 12 warnings
applications/__tests__/e2e-bundle.test.js > bundle > openapi with $and and $description:
applications/__tests__/e2e-bundle.test.js#L113
Error: Snapshot `bundle > openapi with $and and $description 1` mismatched
- Expected
+ Received
- "openapi: 3.1.0
- info:
- title: Test
- version: 1.0.0
- paths:
- /test:
- get:
- responses:
- '200':
- description: Test $and with $description.
- content:
- application/json:
- x-type:
- $and:
- - az:
- bukh: vidh
- $descriptions:
- bukh: Description of az.bukh
- - az:
- glagol: dobro
- $descriptions:
- glagol: Description of az.glagol
- examples:
- Correct:
- value:
- az:
- bukh: vidh
- glagol: dobro
- Incorrect:
- value:
- az:
- glagol: vidh
- not-expected: fail
- schema:
- type: object
- properties:
- az:
- type: object
- properties:
- bukh:
- description: Description of az.bukh
- type: string
- enum:
- - vidh
- glagol:
- description: Description of az.glagol
- type: string
- enum:
- - dobro
- required:
- - bukh
- - glagol
- additionalProperties: false
- required:
- - az
- additionalProperties: false
- components: {}
- "
+ undefined
❯ applications/__tests__/e2e-bundle.test.js:113:20
|
applications/__tests__/e2e-lint.test.js > lint > openapi with $and and $description:
applications/__tests__/e2e-lint.test.js#L82
Error: Snapshot `lint > openapi with $and and $description 1` mismatched
- Expected
+ Received
- "validating applications/resources/openapi-and-with-descriptions.yaml...
- [1] applications/resources/openapi-and-with-descriptions.yaml:35:23 at #/paths/~1test/get/responses/200/content/application~1json/examples/Incorrect/value/az
-
- Example value must conform to the schema: `az` property must have required property 'bukh'.
-
- 33 | az:
- 34 | # missing bukh
- 35 | glagol: vidh
- | ^^^^^^^^^^^^
- 36 | not-expected: fail
- | ^^^^^^^^^^^^^^^^^^
- 37 |
-
- referenced from applications/resources/openapi-and-with-descriptions.yaml:13:15 at #/paths/~1test/get/responses/200/content/application~1json
-
- Error was generated by the no-invalid-media-type-examples rule.
-
-
- [2] applications/resources/openapi-and-with-descriptions.yaml:36:23 at #/paths/~1test/get/responses/200/content/application~1json/examples/Incorrect/value/az/not-expected
-
- Example value must conform to the schema: `az` property must NOT have additional properties `not-expected`.
-
- 34 | # missing bukh
- 35 | glagol: vidh
- 36 | not-expected: fail
- | ^^^^^^^^^^^^
- 37 |
-
- referenced from applications/resources/openapi-and-with-descriptions.yaml:13:15 at #/paths/~1test/get/responses/200/content/application~1json
-
- Error was generated by the no-invalid-media-type-examples rule.
-
+ "
+ applications/resources/openapi-and-with-descriptions.yaml does not exist or is invalid.
- [3] applications/resources/openapi-and-with-descriptions.yaml:35:31 at #/paths/~1test/get/responses/200/content/application~1json/examples/Incorrect/value/az/glagol
-
- Example value must conform to the schema: `glagol` property must be equal to one of the allowed values "dobro".
-
- Did you mean: dobro ?
-
- 33 | az:
- 34 | # missing bukh
- 35 | glagol: vidh
- | ^^^^
- 36 | not-expected: fail
- 37 |
-
- referenced from applications/resources/openapi-and-with-descriptions.yaml:13:15 at #/paths/~1test/get/responses/200/content/application~1json
-
- Error was generated by the no-invalid-media-type-examples rule.
-
-
- applications/resources/openapi-and-with-descriptions.yaml: validated in <test>ms
-
- ❌ Validation failed with 3 errors.
- run `redocly lint --generate-ignore-file` to add all problems to the ignore file.
+ Please provide a valid path.
"
❯ applications/__tests__/e2e-lint.test.js:82:30
|
code-quality
Process completed with exit code 1.
|
code-quality
Failed to parse the json-summary at path "/home/runner/work/json-types/json-types/coverage/coverage-summary.json."
Make sure to run vitest before this action and to include the "json-summary" reporter.
Original Error:
Error: ENOENT: no such file or directory, open '/home/runner/work/json-types/json-types/coverage/coverage-summary.json'
at async open (node:internal/fs/promises:636:25)
at async readFile (node:internal/fs/promises:1246:14)
at async Mr (/home/runner/work/_actions/davelosert/vitest-coverage-report-action/v1/dist/index.js:42:177)
at async $r (/home/runner/work/_actions/davelosert/vitest-coverage-report-action/v1/dist/index.js:42:258)
at async dn (/home/runner/work/_actions/davelosert/vitest-coverage-report-action/v1/dist/index.js:83:287)
|
code-quality
Error: ENOENT: no such file or directory, open '/home/runner/work/json-types/json-types/coverage/coverage-summary.json'
|
code-style
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions/setup-node@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
code-style:
applications/__tests__/e2e-utils.js#L2
'spawnSync' is defined but never used
|
code-style:
applications/json-schema-adapter.js#L8
'writeOnly' is assigned a value but never used
|
code-style:
applications/json-schema-adapter.js#L12
'readOnly' is assigned a value but never used
|
code-style:
applications/json-schema-adapter.js#L90
'i' is defined but never used
|
code-style:
applications/json-schema-adapter.js#L97
'i' is defined but never used
|
code-style:
applications/json-schema-adapter.js#L111
'i' is defined but never used
|
code-style:
applications/x-types-decorators.js#L63
'opts' is defined but never used
|
code-style:
applications/x-types-decorators.js#L67
'ctx' is defined but never used
|
code-style:
applications/x-types-decorators.js#L82
'opts' is defined but never used
|
code-style:
applications/x-types-decorators.js#L112
'ctx' is defined but never used
|
code-quality
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, actions/setup-node@v3, davelosert/vitest-coverage-report-action@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|