We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53647f6 commit f9a8a75Copy full SHA for f9a8a75
packages/core/src/rules/ajv.ts
@@ -100,9 +100,10 @@ export function validateJsonSchema(
100
specVersion: string = 'oas3_1'
101
): { valid: boolean; errors: (ErrorObject & { suggest?: string[] })[] } {
102
const validate =
103
- specVersion === 'oas3_1'
104
- ? getAjvValidator(schema, schemaLoc, resolve, allowAdditionalProperties)
105
- : getAjvDraft04Validator(schema, schemaLoc, resolve);
+ specVersion === 'oas3_0' || specVersion === 'oas2'
+ ? getAjvDraft04Validator(schema, schemaLoc, resolve)
+ : getAjvValidator(schema, schemaLoc, resolve, allowAdditionalProperties);
106
+
107
if (!validate) return { valid: true, errors: [] }; // unresolved refs are reported
108
109
const valid = validate(data, {
0 commit comments