( schema: S, expected: object )
| 64 | } |
| 65 | |
| 66 | async function assertOpenApi3_1<S extends Schema.Schema.All>( |
| 67 | schema: S, |
| 68 | expected: object |
| 69 | ) { |
| 70 | const definitions = {} |
| 71 | const jsonSchema = JSONSchema.fromAST(schema.ast, { |
| 72 | definitions, |
| 73 | target: "openApi3.1" |
| 74 | }) |
| 75 | deepStrictEqual(jsonSchema, expected) |
| 76 | const valid = ajv2020.validateSchema(jsonSchema) |
| 77 | if (valid instanceof Promise) { |
| 78 | await valid |
| 79 | } |
| 80 | strictEqual(ajvDraft7.errors, null) |
| 81 | return jsonSchema |
| 82 | } |
| 83 | |
| 84 | async function assertDraft2020_12<S extends Schema.Schema.All>( |
| 85 | schema: S, |
no test coverage detected
searching dependent graphs…