add naive discriminator handlers #61
check.yaml
on: push
code-quality
30s
code-style
15s
Annotations
5 errors and 12 warnings
applications/__tests__/e2e-bundle.test.js > bundle > openapi with discriminators converted to schemas:
applications/__tests__/e2e-bundle.test.js#L120
Error: Snapshot `bundle > openapi with discriminators converted to schemas 1` mismatched
- Expected
+ Received
@@ -34,13 +34,17 @@
mapping:
glagol: '#/components/schemas/Glagol'
dobro: '#/components/schemas/Dobro'
examples:
Correct:
- value: TODO
+ value:
+ bukh: glagol
+ vidh: 1
+ specificToGlagol: false
Incorrect:
- value: TODO
+ value:
+ bukh: dobro
application/polymorphism+json:
x-type:
- $ref: '#/components/x-types/H'
- kako: for_mhslite
mhslite: boolean
@@ -76,13 +80,16 @@
- mhslite
- discriminator
additionalProperties: false
examples:
Correct:
- value: TODO
+ value:
+ kako: for_H
+ ludh: 1
Incorrect:
- value: TODO
+ value:
+ kako: wrong
components:
schemas:
Az:
type: object
properties:
@@ -112,11 +119,11 @@
discriminator:
type: string
enum:
- for test
Zelo:
- anyOf:
+ oneOf:
- $ref: '#/components/schemas/H'
- type: object
properties:
mhslite:
type: boolean
❯ applications/__tests__/e2e-bundle.test.js:120:20
|
applications/__tests__/e2e-bundle.test.js > bundle > openapi with discriminators converted to x-types:
applications/__tests__/e2e-bundle.test.js#L127
Error: Snapshot `bundle > openapi with discriminators converted to x-types 1` mismatched
- Expected
+ Received
@@ -12,21 +12,28 @@
application/inheritance+json:
x-type:
$ref: '#/components/x-types/Az'
examples:
Correct:
- value: TODO
+ value:
+ bukh: glagol
+ vidh: 1
+ specificToGlagol: false
Incorrect:
- value: TODO
+ value:
+ bukh: dobro
application/polymorphism+json:
x-type:
$ref: '#/components/x-types/Zelo'
examples:
Correct:
- value: TODO
+ value:
+ kako: for_H
+ ludh: 1
Incorrect:
- value: TODO
+ value:
+ kako: wrong
components:
schemas:
Az:
type: object
properties:
@@ -56,11 +63,11 @@
discriminator:
type: string
enum:
- for test
Zelo:
- anyOf:
+ oneOf:
- $ref: '#/components/schemas/H'
- type: object
properties:
mhslite:
type: boolean
❯ applications/__tests__/e2e-bundle.test.js:127:20
|
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#L104
'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/
|