diff --git a/packages/apidom-ns-json-schema-draft-4/src/media-types.ts b/packages/apidom-ns-json-schema-draft-4/src/media-types.ts index 1d7e329503..0f39bc7d1c 100644 --- a/packages/apidom-ns-json-schema-draft-4/src/media-types.ts +++ b/packages/apidom-ns-json-schema-draft-4/src/media-types.ts @@ -9,7 +9,7 @@ export class JSONSchemaDraft4MediaTypes extends MediaTypes { return this.filter((mediaType) => mediaType.includes(effectiveFormat)); } - findBy(version = 'draft-4', format: Format = 'generic') { + findBy(version = 'draft-04', format: Format = 'generic') { const search = format === 'generic' ? `schema;version=${version}` : `schema+${format};version=${version}`; const found = this.find((mediaType) => mediaType.includes(search)); @@ -23,9 +23,9 @@ export class JSONSchemaDraft4MediaTypes extends MediaTypes { } const mediaTypes = new JSONSchemaDraft4MediaTypes( - 'application/schema;version=draft-4', - 'application/schema+json;version=draft-4', - 'application/schema+yaml;version=draft-4', + 'application/schema;version=draft-04', + 'application/schema+json;version=draft-04', + 'application/schema+yaml;version=draft-04', ); export default mediaTypes; diff --git a/packages/apidom-ns-json-schema-draft-6/src/media-types.ts b/packages/apidom-ns-json-schema-draft-6/src/media-types.ts index 6e74731663..e4d0e5a89a 100644 --- a/packages/apidom-ns-json-schema-draft-6/src/media-types.ts +++ b/packages/apidom-ns-json-schema-draft-6/src/media-types.ts @@ -9,7 +9,7 @@ export class JSONSchemaDraft6MediaTypes extends MediaTypes { return this.filter((mediaType) => mediaType.includes(effectiveFormat)); } - findBy(version = 'draft-6', format: Format = 'generic') { + findBy(version = 'draft-06', format: Format = 'generic') { const search = format === 'generic' ? `schema;version=${version}` : `schema+${format};version=${version}`; const found = this.find((mediaType) => mediaType.includes(search)); @@ -23,9 +23,9 @@ export class JSONSchemaDraft6MediaTypes extends MediaTypes { } const mediaTypes = new JSONSchemaDraft6MediaTypes( - 'application/schema;version=draft-6', - 'application/schema+json;version=draft-6', - 'application/schema+yaml;version=draft-6', + 'application/schema;version=draft-06', + 'application/schema+json;version=draft-06', + 'application/schema+yaml;version=draft-06', ); export default mediaTypes; diff --git a/packages/apidom-ns-json-schema-draft-7/src/media-types.ts b/packages/apidom-ns-json-schema-draft-7/src/media-types.ts index 91424f0d73..3004da30cf 100644 --- a/packages/apidom-ns-json-schema-draft-7/src/media-types.ts +++ b/packages/apidom-ns-json-schema-draft-7/src/media-types.ts @@ -9,7 +9,7 @@ export class JSONSchemaDraft7MediaTypes extends MediaTypes { return this.filter((mediaType) => mediaType.includes(effectiveFormat)); } - findBy(version = 'draft-7', format: Format = 'generic') { + findBy(version = 'draft-07', format: Format = 'generic') { const search = format === 'generic' ? `schema;version=${version}` : `schema+${format};version=${version}`; const found = this.find((mediaType) => mediaType.includes(search)); @@ -23,9 +23,9 @@ export class JSONSchemaDraft7MediaTypes extends MediaTypes { } const mediaTypes = new JSONSchemaDraft7MediaTypes( - 'application/schema;version=draft-7', - 'application/schema+json;version=draft-7', - 'application/schema+yaml;version=draft-7', + 'application/schema;version=draft-07', + 'application/schema+json;version=draft-07', + 'application/schema+yaml;version=draft-07', ); export default mediaTypes;