Migrate catalog-react and app blueprints to configSchema

Move EntityCardBlueprint and EntityContentBlueprint to the new
`configSchema` option using zod v3, and AppLanguageApi to zod v4.
Fix config schema merge in `makeWithOverrides` when mixing
`configSchema` and deprecated `config.schema` sources.

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
Made-with: Cursor
This commit is contained in:
Patrik Oldsberg
2026-04-10 10:39:50 +02:00
parent 8bb8560557
commit 1ef7954725
8 changed files with 74 additions and 482 deletions
+4 -5
View File
@@ -18,14 +18,13 @@
import { AppLanguageSelector } from '../../../../packages/core-app-api/src/apis/implementations/AppLanguageApi';
import { appLanguageApiRef } from '@backstage/frontend-plugin-api';
import { ApiBlueprint } from '@backstage/frontend-plugin-api';
import { z } from 'zod';
export const AppLanguageApi = ApiBlueprint.makeWithOverrides({
name: 'app-language',
config: {
schema: {
defaultLanguage: z => z.string().optional(),
availableLanguages: z => z.array(z.string()).optional(),
},
configSchema: {
defaultLanguage: z.string().optional(),
availableLanguages: z.array(z.string()).optional(),
},
factory(originalFactory, { config }) {
return originalFactory(defineParams =>