diff --git a/projects/igniteui-angular/migrations/common/schema/binding.schema.json b/projects/igniteui-angular/migrations/common/schema/binding.schema.json index a91b3b2bfca..719ab04e3f4 100644 --- a/projects/igniteui-angular/migrations/common/schema/binding.schema.json +++ b/projects/igniteui-angular/migrations/common/schema/binding.schema.json @@ -43,8 +43,8 @@ }, "ElementType": { "enum": [ - "component", - "directive" + "directive", + "component" ], "type": "string" }, diff --git a/projects/igniteui-angular/migrations/common/schema/class.schema.json b/projects/igniteui-angular/migrations/common/schema/class.schema.json index b68fef8cfcf..0c46cbf79ee 100644 --- a/projects/igniteui-angular/migrations/common/schema/class.schema.json +++ b/projects/igniteui-angular/migrations/common/schema/class.schema.json @@ -1,5 +1,5 @@ { - "$schema": "http://json-schema.org/draft-06/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "ClassChange": { "properties": { diff --git a/projects/igniteui-angular/migrations/common/schema/imports.schema.json b/projects/igniteui-angular/migrations/common/schema/imports.schema.json index 43c4436746e..946ef5e2150 100644 --- a/projects/igniteui-angular/migrations/common/schema/imports.schema.json +++ b/projects/igniteui-angular/migrations/common/schema/imports.schema.json @@ -1,18 +1,35 @@ { "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "ImportsChange": { + "properties": { + "name": { + "description": "Name of the module to change", + "type": "string" + }, + "replaceWith": { + "description": "Replace original name with new one", + "type": "string" + } + }, + "required": [ + "name", + "replaceWith" + ], + "type": "object" + } + }, "properties": { - "name": { - "description": "Name of the module to change", - "type": "string" - }, - "replaceWith": { - "description": "Replace original name with new one", - "type": "string" + "changes": { + "description": "An array of changes to imports array", + "items": { + "$ref": "#/definitions/ImportsChange" + }, + "type": "array" } }, "required": [ - "name", - "replaceWith" + "changes" ], "type": "object" } diff --git a/projects/igniteui-angular/migrations/common/schema/index.ts b/projects/igniteui-angular/migrations/common/schema/index.ts index 7db635bada9..6186d515a11 100644 --- a/projects/igniteui-angular/migrations/common/schema/index.ts +++ b/projects/igniteui-angular/migrations/common/schema/index.ts @@ -1,5 +1,5 @@ // generate schema: -// npx typescript-json-schema migrations/common/schema/index.ts SelectorChanges -o migrations/common/schema/selector.schema.json --required +// npx typescript-json-schema projects/igniteui-angular/migrations/common/schema/index.ts ThemeChanges -o projects/igniteui-angular/migrations/common/schema/theme-changes.schema.json --required export interface ThemeChanges { /** An array of changes to theme function properties */ diff --git a/projects/igniteui-angular/migrations/common/schema/selector.schema.json b/projects/igniteui-angular/migrations/common/schema/selector.schema.json index f743982e08a..9d404fbd1b4 100644 --- a/projects/igniteui-angular/migrations/common/schema/selector.schema.json +++ b/projects/igniteui-angular/migrations/common/schema/selector.schema.json @@ -3,8 +3,8 @@ "definitions": { "ElementType": { "enum": [ - "component", - "directive" + "directive", + "component" ], "type": "string" }, diff --git a/projects/igniteui-angular/migrations/common/schema/theme-changes.schema.json b/projects/igniteui-angular/migrations/common/schema/theme-changes.schema.json index e36166bf2ae..9f72415c4bb 100644 --- a/projects/igniteui-angular/migrations/common/schema/theme-changes.schema.json +++ b/projects/igniteui-angular/migrations/common/schema/theme-changes.schema.json @@ -24,14 +24,18 @@ "description": "The type of the change: variable, function, mixin" } }, + "required": [ + "name", + "type" + ], "type": "object" }, "ThemeType": { "enum": [ - "function", - "mixin", + "variable", "property", - "variable" + "function", + "mixin" ], "type": "string" } @@ -45,6 +49,9 @@ "type": "array" } }, + "required": [ + "changes" + ], "type": "object" } diff --git a/projects/igniteui-angular/migrations/common/schema/theme-props.schema.json b/projects/igniteui-angular/migrations/common/schema/theme-props.schema.json deleted file mode 100644 index a6d8bdfcac9..00000000000 --- a/projects/igniteui-angular/migrations/common/schema/theme-props.schema.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema#", - "definitions": { - "ThemePropertyChange": { - "properties": { - "name": { - "description": "Name of the theme property", - "type": "string" - }, - "owner": { - "description": "Theming function this parameter belongs to", - "type": "string" - }, - "remove": { - "description": "Remove directive/component/property", - "type": "boolean" - }, - "replaceWith": { - "description": "Replace original selector/property with new one", - "type": "string" - } - }, - "required": [ - "name", - "owner" - ], - "type": "object" - }, - "ThemeVariableChange": { - "properties": { - "name": { - "description": "Name of the theme variable", - "type": "string" - }, - "remove": { - "description": "Remove directive/component/property", - "type": "boolean" - }, - "replaceWith": { - "description": "Replace original selector/property with new one", - "type": "string" - } - }, - "required": [ - "name" - ], - "type": "object" - } - }, - "properties": { - "changes": { - "description": "An array of changes to theme function properties", - "items": { - "anyOf": [ - { - "$ref": "#/definitions/ThemePropertyChange" - }, - { - "$ref": "#/definitions/ThemeVariableChange" - } - ] - }, - "type": "array" - } - }, - "required": [ - "changes" - ], - "type": "object" -} -