| 540 | ast.annotations[AST.SchemaIdAnnotationId] === AST.ParseJsonSchemaId |
| 541 | |
| 542 | const isOverrideAnnotation = (ast: AST.AST, jsonSchema: JsonSchema7): boolean => { |
| 543 | if (AST.isRefinement(ast)) { |
| 544 | const schemaId = ast.annotations[AST.SchemaIdAnnotationId] |
| 545 | if (schemaId === schemaId_.IntSchemaId) { |
| 546 | return "type" in jsonSchema && jsonSchema.type !== "integer" |
| 547 | } |
| 548 | } |
| 549 | return ("type" in jsonSchema) || ("oneOf" in jsonSchema) || ("anyOf" in jsonSchema) || ("$ref" in jsonSchema) |
| 550 | } |
| 551 | |
| 552 | const mergeRefinements = (from: any, jsonSchema: any, ast: AST.AST): any => { |
| 553 | const out: any = { ...from, ...getJsonSchemaAnnotations(ast), ...jsonSchema } |