We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eIt seems as if the required value resolved is not firing when mixing required and non-required values:
export function mergeSchemas(schemas: any[]) { return mergeAllOf({ allOf: schemas, }, { resolvers: { type: (values) => { const finalType = [] for (const value of values) { if (Array.isArray(value)) { finalType.push(...value) } else { finalType.push(value) } } return finalType as any }, required: (values) => { console.log("required resolver", values) return false } } }) } console.log(mergeSchemas([ { "type": "object", "properties": { "hey": { "type": "string", "required": true }, "this": { "type": "number", "required": true }, "is": { "type": "array", "items": { "type": "string", "required": true }, "required": true } }, "required": true }, { "type": "object", "properties": { "hey": { "type": "string" }, "this": { "type": "number" }, "is": { "type": "array", "items": { "type": "string" } } } }]))
Outputs:
{ type: 'object', required: true, properties: { hey: { type: 'string', required: true }, this: { type: 'number', required: true }, is: { type: 'array', required: true, items: [Object] } } }
notice that:
required resolver
The text was updated successfully, but these errors were encountered:
No branches or pull requests
eIt seems as if the required value resolved is not firing when mixing required and non-required values:
Outputs:
notice that:
required resolver
lineThe text was updated successfully, but these errors were encountered: