diff --git a/.changeset/scaffolder-backend-model-registration.md b/.changeset/scaffolder-backend-model-registration.md deleted file mode 100644 index 57e5b71889..0000000000 --- a/.changeset/scaffolder-backend-model-registration.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Integrated the Template kind model layer with the catalog model registry service. diff --git a/packages/catalog-model/src/kinds/ApiEntityV1alpha1.ts b/packages/catalog-model/src/kinds/ApiEntityV1alpha1.ts index d29f0d57a4..565266e219 100644 --- a/packages/catalog-model/src/kinds/ApiEntityV1alpha1.ts +++ b/packages/catalog-model/src/kinds/ApiEntityV1alpha1.ts @@ -16,7 +16,7 @@ import { createCatalogModelLayer } from '../model/createCatalogModelLayer'; import type { Entity } from '../entity/Entity'; -import schema from '../schema/kinds/API.v1alpha1.schema.json'; +import jsonSchema from '../schema/kinds/API.v1alpha1.schema.json'; import { ajvCompiledJsonSchemaValidator } from './util'; /** @@ -46,7 +46,7 @@ export interface ApiEntityV1alpha1 extends Entity { * @public */ export const apiEntityV1alpha1Validator = - ajvCompiledJsonSchemaValidator(schema); + ajvCompiledJsonSchemaValidator(jsonSchema); /** * Extends the catalog model with the API kind. @@ -84,7 +84,7 @@ export const apiEntityModel = createCatalogModelLayer({ }, ], schema: { - jsonSchema: schema, + jsonSchema, }, }, ], diff --git a/packages/catalog-model/src/kinds/ComponentEntityV1alpha1.ts b/packages/catalog-model/src/kinds/ComponentEntityV1alpha1.ts index 0df197cf38..c88f24b44d 100644 --- a/packages/catalog-model/src/kinds/ComponentEntityV1alpha1.ts +++ b/packages/catalog-model/src/kinds/ComponentEntityV1alpha1.ts @@ -16,7 +16,7 @@ import { createCatalogModelLayer } from '../model/createCatalogModelLayer'; import type { Entity } from '../entity/Entity'; -import schema from '../schema/kinds/Component.v1alpha1.schema.json'; +import jsonSchema from '../schema/kinds/Component.v1alpha1.schema.json'; import { ajvCompiledJsonSchemaValidator } from './util'; /** @@ -50,7 +50,7 @@ export interface ComponentEntityV1alpha1 extends Entity { * @public */ export const componentEntityV1alpha1Validator = - ajvCompiledJsonSchemaValidator(schema); + ajvCompiledJsonSchemaValidator(jsonSchema); /** * Extends the catalog model with the Component kind. @@ -116,7 +116,7 @@ export const componentEntityModel = createCatalogModelLayer({ }, ], schema: { - jsonSchema: schema, + jsonSchema, }, }, ], diff --git a/packages/catalog-model/src/kinds/DomainEntityV1alpha1.ts b/packages/catalog-model/src/kinds/DomainEntityV1alpha1.ts index 5b223ca419..da1280f0b2 100644 --- a/packages/catalog-model/src/kinds/DomainEntityV1alpha1.ts +++ b/packages/catalog-model/src/kinds/DomainEntityV1alpha1.ts @@ -16,7 +16,7 @@ import { createCatalogModelLayer } from '../model/createCatalogModelLayer'; import type { Entity } from '../entity/Entity'; -import schema from '../schema/kinds/Domain.v1alpha1.schema.json'; +import jsonSchema from '../schema/kinds/Domain.v1alpha1.schema.json'; import { ajvCompiledJsonSchemaValidator } from './util'; /** @@ -44,7 +44,7 @@ export interface DomainEntityV1alpha1 extends Entity { * @public */ export const domainEntityV1alpha1Validator = - ajvCompiledJsonSchemaValidator(schema); + ajvCompiledJsonSchemaValidator(jsonSchema); /** * Extends the catalog model with the Domain kind. @@ -82,7 +82,7 @@ export const domainEntityModel = createCatalogModelLayer({ }, ], schema: { - jsonSchema: schema, + jsonSchema, }, }, ], diff --git a/packages/catalog-model/src/kinds/GroupEntityV1alpha1.ts b/packages/catalog-model/src/kinds/GroupEntityV1alpha1.ts index ac5832f05b..c3f6c22351 100644 --- a/packages/catalog-model/src/kinds/GroupEntityV1alpha1.ts +++ b/packages/catalog-model/src/kinds/GroupEntityV1alpha1.ts @@ -16,7 +16,7 @@ import { createCatalogModelLayer } from '../model/createCatalogModelLayer'; import type { Entity } from '../entity/Entity'; -import schema from '../schema/kinds/Group.v1alpha1.schema.json'; +import jsonSchema from '../schema/kinds/Group.v1alpha1.schema.json'; import { ajvCompiledJsonSchemaValidator } from './util'; /** @@ -45,7 +45,7 @@ export interface GroupEntityV1alpha1 extends Entity { * @public */ export const groupEntityV1alpha1Validator = - ajvCompiledJsonSchemaValidator(schema); + ajvCompiledJsonSchemaValidator(jsonSchema); /** * Extends the catalog model with the Group kind. @@ -91,7 +91,7 @@ export const groupEntityModel = createCatalogModelLayer({ }, ], schema: { - jsonSchema: schema, + jsonSchema, }, }, ], diff --git a/packages/catalog-model/src/kinds/LocationEntityV1alpha1.ts b/packages/catalog-model/src/kinds/LocationEntityV1alpha1.ts index 3ddcfcb17d..0f02419bbf 100644 --- a/packages/catalog-model/src/kinds/LocationEntityV1alpha1.ts +++ b/packages/catalog-model/src/kinds/LocationEntityV1alpha1.ts @@ -16,7 +16,7 @@ import { createCatalogModelLayer } from '../model/createCatalogModelLayer'; import type { Entity } from '../entity/Entity'; -import schema from '../schema/kinds/Location.v1alpha1.schema.json'; +import jsonSchema from '../schema/kinds/Location.v1alpha1.schema.json'; import { ajvCompiledJsonSchemaValidator } from './util'; /** @@ -41,7 +41,7 @@ export interface LocationEntityV1alpha1 extends Entity { * @public */ export const locationEntityV1alpha1Validator = - ajvCompiledJsonSchemaValidator(schema); + ajvCompiledJsonSchemaValidator(jsonSchema); /** * Extends the catalog model with the Location kind. @@ -64,7 +64,7 @@ export const locationEntityModel = createCatalogModelLayer({ { name: ['v1alpha1', 'v1beta1'], schema: { - jsonSchema: schema, + jsonSchema, }, }, ], diff --git a/packages/catalog-model/src/kinds/ResourceEntityV1alpha1.ts b/packages/catalog-model/src/kinds/ResourceEntityV1alpha1.ts index 16c1697616..3fe873a925 100644 --- a/packages/catalog-model/src/kinds/ResourceEntityV1alpha1.ts +++ b/packages/catalog-model/src/kinds/ResourceEntityV1alpha1.ts @@ -16,7 +16,7 @@ import { createCatalogModelLayer } from '../model/createCatalogModelLayer'; import type { Entity } from '../entity/Entity'; -import schema from '../schema/kinds/Resource.v1alpha1.schema.json'; +import jsonSchema from '../schema/kinds/Resource.v1alpha1.schema.json'; import { ajvCompiledJsonSchemaValidator } from './util'; /** @@ -46,7 +46,7 @@ export interface ResourceEntityV1alpha1 extends Entity { * @public */ export const resourceEntityV1alpha1Validator = - ajvCompiledJsonSchemaValidator(schema); + ajvCompiledJsonSchemaValidator(jsonSchema); /** * Extends the catalog model with the Resource kind. @@ -94,7 +94,7 @@ export const resourceEntityModel = createCatalogModelLayer({ }, ], schema: { - jsonSchema: schema, + jsonSchema, }, }, ], diff --git a/packages/catalog-model/src/kinds/SystemEntityV1alpha1.ts b/packages/catalog-model/src/kinds/SystemEntityV1alpha1.ts index cfd700e3ae..4655033420 100644 --- a/packages/catalog-model/src/kinds/SystemEntityV1alpha1.ts +++ b/packages/catalog-model/src/kinds/SystemEntityV1alpha1.ts @@ -16,7 +16,7 @@ import { createCatalogModelLayer } from '../model/createCatalogModelLayer'; import type { Entity } from '../entity/Entity'; -import schema from '../schema/kinds/System.v1alpha1.schema.json'; +import jsonSchema from '../schema/kinds/System.v1alpha1.schema.json'; import { ajvCompiledJsonSchemaValidator } from './util'; /** @@ -44,7 +44,7 @@ export interface SystemEntityV1alpha1 extends Entity { * @public */ export const systemEntityV1alpha1Validator = - ajvCompiledJsonSchemaValidator(schema); + ajvCompiledJsonSchemaValidator(jsonSchema); /** * Extends the catalog model with the System kind. @@ -82,7 +82,7 @@ export const systemEntityModel = createCatalogModelLayer({ }, ], schema: { - jsonSchema: schema, + jsonSchema, }, }, ], diff --git a/packages/catalog-model/src/kinds/UserEntityV1alpha1.ts b/packages/catalog-model/src/kinds/UserEntityV1alpha1.ts index 8da2525a06..f962f75fea 100644 --- a/packages/catalog-model/src/kinds/UserEntityV1alpha1.ts +++ b/packages/catalog-model/src/kinds/UserEntityV1alpha1.ts @@ -16,7 +16,7 @@ import { createCatalogModelLayer } from '../model/createCatalogModelLayer'; import type { Entity } from '../entity/Entity'; -import schema from '../schema/kinds/User.v1alpha1.schema.json'; +import jsonSchema from '../schema/kinds/User.v1alpha1.schema.json'; import { ajvCompiledJsonSchemaValidator } from './util'; /** @@ -43,7 +43,7 @@ export interface UserEntityV1alpha1 extends Entity { * @public */ export const userEntityV1alpha1Validator = - ajvCompiledJsonSchemaValidator(schema); + ajvCompiledJsonSchemaValidator(jsonSchema); /** * Extends the catalog model with the User kind. @@ -75,7 +75,7 @@ export const userEntityModel = createCatalogModelLayer({ }, ], schema: { - jsonSchema: schema, + jsonSchema, }, }, ], diff --git a/plugins/scaffolder-common/src/catalogModel.ts b/plugins/scaffolder-common/src/catalogModel.ts index d383451ea5..d360e857cb 100644 --- a/plugins/scaffolder-common/src/catalogModel.ts +++ b/plugins/scaffolder-common/src/catalogModel.ts @@ -15,8 +15,8 @@ */ import { createCatalogModelLayer } from '@backstage/catalog-model/alpha'; -import { JsonObject } from '@backstage/types'; -import schema from './Template.v1beta3.schema.json'; +import type { JsonObject } from '@backstage/types'; +import jsonSchema from './Template.v1beta3.schema.json'; /** * Extends the catalog model with the Template kind. @@ -48,7 +48,7 @@ export const scaffolderCatalogModelLayer = createCatalogModelLayer({ }, ], schema: { - jsonSchema: schema as JsonObject, + jsonSchema: jsonSchema as JsonObject, }, }, ],