Closed pihentagy closed 1 year ago
I'm also running into this same issue.
The incompatibility with how ajv
validates this is documented here: https://github.com/ajv-validator/ajv/issues/1496.
Apperently the solution is to use "unevaluatedProperties", but it's unclear to me if this would be part of the OpenAPI spec (or even if it's official json schema for that matter)
Thanks for this!
Intersection types in JSON Schema works differently than in e.g. TypeScript. Merging A and B into one self-contained object C will make this work.
Given the following typescript file:
typeconv produces the following json schema:
However, the following json will not validate against type C in the schema:
You can check it only at https://www.jsonschemavalidator.net/. You should add the following lines to the beginning of the json schema: