@@ -34,7 +34,7 @@ import * as Draft07 from '@hyperjump/json-schema/draft-07';
34
34
import * as Draft201909 from '@hyperjump/json-schema/draft-2019-09' ;
35
35
import * as Draft202012 from '@hyperjump/json-schema/draft-2020-12' ;
36
36
37
- type SupportedSchemaVersions = '2020-12' | '2019-09' | 'draft-07' | 'draft-04' ;
37
+ type SupportedSchemaVersion = '2020-12' | '2019-09' | 'draft-07' | 'draft-04' ;
38
38
export declare type CustomSchemaProvider = ( uri : string ) => Promise < string | string [ ] > ;
39
39
40
40
export enum MODIFICATION_ACTIONS {
@@ -757,7 +757,7 @@ export class YAMLSchemaService extends JSONSchemaService {
757
757
/**
758
758
* Detect the JSON Schema version from the $schema property
759
759
*/
760
- private detectSchemaVersion ( schema : JSONSchema ) : SupportedSchemaVersions {
760
+ private detectSchemaVersion ( schema : JSONSchema ) : SupportedSchemaVersion {
761
761
const schemaProperty = schema . $schema ;
762
762
if ( typeof schemaProperty === 'string' ) {
763
763
if ( schemaProperty . includes ( '2020-12' ) ) {
@@ -777,7 +777,7 @@ export class YAMLSchemaService extends JSONSchemaService {
777
777
* Get the appropriate validator module for a schema version
778
778
*/
779
779
// eslint-disable-next-line @typescript-eslint/no-explicit-any
780
- private getValidatorForVersion ( version : SupportedSchemaVersions ) : any {
780
+ private getValidatorForVersion ( version : SupportedSchemaVersion ) : any {
781
781
switch ( version ) {
782
782
case '2020-12' :
783
783
return Draft202012 ;
@@ -794,7 +794,7 @@ export class YAMLSchemaService extends JSONSchemaService {
794
794
/**
795
795
* Get the correct schema meta URI for a given version
796
796
*/
797
- private getSchemaMetaSchema ( version : SupportedSchemaVersions ) : string {
797
+ private getSchemaMetaSchema ( version : SupportedSchemaVersion ) : string {
798
798
switch ( version ) {
799
799
case '2020-12' :
800
800
return 'https://json-schema.org/draft/2020-12/schema' ;
0 commit comments