Rename schema imports to jsonSchema and remove stale changeset

Rename the JSON schema imports in kind definitions from `schema` to
`jsonSchema` to enable shorthand property syntax. Also remove the
stale scaffolder-backend changeset since that package no longer has
changes in this PR.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@spotify.com>
This commit is contained in:
Fredrik Adelöw
2026-04-14 15:44:11 +02:00
parent ca54251763
commit 3e291ae523
10 changed files with 27 additions and 32 deletions
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
Integrated the Template kind model layer with the catalog model registry service.
@@ -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,
},
},
],
@@ -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,
},
},
],
@@ -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,
},
},
],
@@ -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,
},
},
],
@@ -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,
},
},
],
@@ -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,
},
},
],
@@ -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,
},
},
],
@@ -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,
},
},
],
@@ -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,
},
},
],