Open voxpelli opened 1 year ago
Hi @voxpelli thanks for reporting, I wasn't aware of that type. I'll have a look in the coming days!
@elsmr Did you get a chance to look at this?
Additionally, schemas created with "ts-json-schema-generator" are considered not being compatible, even though it works well. The error is:
Property '"IConfiguration"' is incompatible with index signature.
Type '{ additionalProperties: boolean; description: string; properties: { lexer: { $ref: string; description: string; }; main: { $ref: string; description: string; }; }; required: string[]; type: string; }' is not assignable to type 'JSONSchema6Definition'.
Type '{ additionalProperties: boolean; description: string; properties: { lexer: { $ref: string; description: string; }; main: { $ref: string; description: string; }; }; required: string[]; type: string; }' is not assignable to type 'JSONSchema6'.
Types of property 'type' are incompatible.
Type 'string' is not assignable to type 'JSONSchema6TypeName | JSONSchema6TypeName[] | undefined'.
As noted by eg. the team behind workbox, currently it's not supported to use a schema that's typed with Ajv's
JSONSchemaType
when sending in a schema to this module.Since it does work in practice, would it be possible to set a more liberal type definition for the
schema
arg, so that theJSONSchemaType
can be accepted as well?