diff --git a/packages/core/src/ruleset/meta/json-extensions.json b/packages/core/src/ruleset/meta/json-extensions.json index b57698d83..f3c6186ec 100644 --- a/packages/core/src/ruleset/meta/json-extensions.json +++ b/packages/core/src/ruleset/meta/json-extensions.json @@ -36,22 +36,7 @@ }, "Format": { "$anchor": "format", - "enum": [ - "oas2", - "oas3", - "oas3.0", - "oas3.1", - "asyncapi2", - "json-schema", - "json-schema-loose", - "json-schema-draft4", - "json-schema-draft6", - "json-schema-draft7", - "json-schema-draft-2019-09", - "json-schema-2019-09", - "json-schema-draft-2020-12", - "json-schema-2020-12" - ], + "type": "string", "errorMessage": "must be a valid format" }, "Functions": { diff --git a/packages/core/src/ruleset/validation/__tests__/validation.test.ts b/packages/core/src/ruleset/validation/__tests__/validation.test.ts index 001427667..3cfab69b9 100644 --- a/packages/core/src/ruleset/validation/__tests__/validation.test.ts +++ b/packages/core/src/ruleset/validation/__tests__/validation.test.ts @@ -941,14 +941,14 @@ describe('JSON Ruleset Validation', () => { it.each<[unknown, RulesetValidationError[]]>([ [ - [2, 'a'], + [2, null], [ new RulesetValidationError('invalid-format', 'must be a valid format', ['formats', '0']), new RulesetValidationError('invalid-format', 'must be a valid format', ['formats', '1']), ], ], [2, [new RulesetValidationError('invalid-ruleset-definition', 'must be an array of formats', ['formats'])]], - [[''], [new RulesetValidationError('invalid-format', 'must be a valid format', ['formats', '0'])]], + [[null], [new RulesetValidationError('invalid-format', 'must be a valid format', ['formats', '0'])]], ])('recognizes invalid ruleset %p formats syntax', (formats, errors) => { expect( assertValidRuleset.bind( @@ -985,7 +985,7 @@ describe('JSON Ruleset Validation', () => { it.each<[unknown, RulesetValidationError[]]>([ [ - [2, 'a'], + [2, null], [ new RulesetValidationError('invalid-format', 'must be a valid format', ['rules', 'rule', 'formats', '0']), new RulesetValidationError('invalid-format', 'must be a valid format', ['rules', 'rule', 'formats', '1']),