Merge pull request #30721 from backstage/rugvip/nodefault

frontend-plugin-api,catalog-react: remove default* prefix from blueprint params
This commit is contained in:
Patrik Oldsberg
2025-08-04 17:15:02 +02:00
committed by GitHub
68 changed files with 275 additions and 176 deletions
+1 -1
View File
@@ -287,7 +287,7 @@ export default createFrontendModule({
createPageExtension({
// Omitting name since we are overriding a plugin index page
// It's up to you whether to use the original default path or not, but links that are hardcoded to the default path won't work if you change it
defaultPath: '/api-docs',
path: '/api-docs',
// Associating the page with a different route ref may result in the sidebar item or external plugin route pointing to an unreachable page
routeRef: convertLegacyRouteRef(rootRoute),
// Custom page components are loaded here
+14 -7
View File
@@ -382,10 +382,13 @@ const _default: FrontendPlugin<
>;
inputs: {};
params: {
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
defaultTitle?: [Error: `Use the 'title' param instead`];
title: string;
defaultGroup?: [Error: `Use the 'group' param instead`];
group?: keyof defaultEntityContentGroups | (string & {});
loader: () => Promise<JSX.Element>;
defaultPath: string;
defaultTitle: string;
defaultGroup?: keyof defaultEntityContentGroups | (string & {});
routeRef?: RouteRef;
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
};
@@ -443,10 +446,13 @@ const _default: FrontendPlugin<
>;
inputs: {};
params: {
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
defaultTitle?: [Error: `Use the 'title' param instead`];
title: string;
defaultGroup?: [Error: `Use the 'group' param instead`];
group?: keyof defaultEntityContentGroups | (string & {});
loader: () => Promise<JSX.Element>;
defaultPath: string;
defaultTitle: string;
defaultGroup?: keyof defaultEntityContentGroups | (string & {});
routeRef?: RouteRef;
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
};
@@ -505,7 +511,8 @@ const _default: FrontendPlugin<
kind: 'page';
name: undefined;
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
+5 -5
View File
@@ -79,7 +79,7 @@ const apiDocsExplorerPage = PageBlueprint.makeWithOverrides({
},
factory(originalFactory, { config }) {
return originalFactory({
defaultPath: '/api-docs',
path: '/api-docs',
routeRef: convertLegacyRouteRef(rootRoute),
loader: () =>
import('./components/ApiExplorerPage').then(m =>
@@ -186,8 +186,8 @@ const apiDocsProvidingComponentsEntityCard = EntityCardBlueprint.make({
const apiDocsDefinitionEntityContent = EntityContentBlueprint.make({
name: 'definition',
params: {
defaultPath: '/definition',
defaultTitle: 'Definition',
path: '/definition',
title: 'Definition',
filter: 'kind:api',
loader: async () =>
import('./components/ApiDefinitionCard').then(m =>
@@ -205,8 +205,8 @@ const apiDocsDefinitionEntityContent = EntityContentBlueprint.make({
const apiDocsApisEntityContent = EntityContentBlueprint.make({
name: 'apis',
params: {
defaultPath: '/apis',
defaultTitle: 'APIs',
path: '/apis',
title: 'APIs',
filter: 'kind:component',
loader: async () =>
import('./components/ApisCards').then(m =>
+2 -1
View File
@@ -58,7 +58,8 @@ const visualizerPlugin: FrontendPlugin<
>;
inputs: {};
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
+1 -1
View File
@@ -26,7 +26,7 @@ const rootRouteRef = createRouteRef();
const appVisualizerPage = PageBlueprint.make({
params: {
defaultPath: '/visualizer',
path: '/visualizer',
routeRef: rootRouteRef,
loader: () =>
import('./components/AppVisualizerPage').then(m => (
+1 -1
View File
@@ -306,7 +306,7 @@ export default createFrontendModule({
extensions: [
createPageExtension({
// Omitting name since it is an index page
defaultPath: '/catalog-graph',
path: '/catalog-graph',
routeRef: convertLegacyRouteRef(catalogGraphRouteRef),
createSchemaFromZod(z => z.object({
path: z.string().default('/catalog-graph')
+2 -1
View File
@@ -189,7 +189,8 @@ const _default: FrontendPlugin<
kind: 'page';
name: undefined;
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
+1 -1
View File
@@ -75,7 +75,7 @@ const CatalogGraphPage = PageBlueprint.makeWithOverrides({
},
factory(originalFactory, { config }) {
return originalFactory({
defaultPath: '/catalog-graph',
path: '/catalog-graph',
routeRef: convertLegacyRouteRef(catalogGraphRouteRef),
loader: () =>
import('./components/CatalogGraphPage').then(m =>
+2 -1
View File
@@ -134,7 +134,8 @@ const _default: FrontendPlugin<
>;
inputs: {};
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
+1 -1
View File
@@ -42,7 +42,7 @@ export * from './translation';
// whether this type of override is typically done with an input or by overriding the entire extension.
const catalogImportPage = PageBlueprint.make({
params: {
defaultPath: '/catalog-import',
path: '/catalog-import',
routeRef: convertLegacyRouteRef(rootRouteRef),
loader: () =>
import('./components/ImportPage').then(m =>
+10 -5
View File
@@ -104,8 +104,10 @@ export function convertLegacyEntityContentExtension(
overrides?: {
name?: string;
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
defaultPath?: string;
defaultTitle?: string;
path?: string;
title?: string;
defaultPath?: [Error: `Use the 'path' override instead`];
defaultTitle?: [Error: `Use the 'title' override instead`];
},
): ExtensionDefinition;
@@ -185,10 +187,13 @@ export type EntityCardType = 'summary' | 'info' | 'content';
export const EntityContentBlueprint: ExtensionBlueprint<{
kind: 'entity-content';
params: {
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
defaultTitle?: [Error: `Use the 'title' param instead`];
title: string;
defaultGroup?: [Error: `Use the 'group' param instead`];
group?: keyof typeof defaultEntityContentGroups | (string & {});
loader: () => Promise<JSX.Element>;
defaultPath: string;
defaultTitle: string;
defaultGroup?: keyof typeof defaultEntityContentGroups | (string & {});
routeRef?: RouteRef;
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
};
@@ -32,8 +32,8 @@ describe('EntityContentBlueprint', () => {
const extension = EntityContentBlueprint.make({
name: 'test',
params: {
defaultPath: '/test',
defaultTitle: 'Test',
path: '/test',
title: 'Test',
loader: async () => <div>Test!</div>,
},
});
@@ -253,8 +253,8 @@ describe('EntityContentBlueprint', () => {
const extension = EntityContentBlueprint.make({
name: 'test',
params: {
defaultPath: '/test',
defaultTitle: 'Test',
path: '/test',
title: 'Test',
routeRef: mockRouteRef,
loader: async () => <div>Test!</div>,
},
@@ -277,8 +277,8 @@ describe('EntityContentBlueprint', () => {
EntityContentBlueprint.make({
name: 'test',
params: {
defaultPath: '/test',
defaultTitle: 'Test',
path: '/test',
title: 'Test',
loader: async () => <div>Test!</div>,
filter: 'test',
},
@@ -291,8 +291,8 @@ describe('EntityContentBlueprint', () => {
EntityContentBlueprint.make({
name: 'test',
params: {
defaultPath: '/test',
defaultTitle: 'Test',
path: '/test',
title: 'Test',
loader: async () => <div>Test!</div>,
},
}),
@@ -305,8 +305,8 @@ describe('EntityContentBlueprint', () => {
EntityContentBlueprint.make({
name: 'test',
params: {
defaultPath: '/test',
defaultTitle: 'Test',
path: '/test',
title: 'Test',
filter: mockFilter,
loader: async () => <div>Test!</div>,
},
@@ -328,8 +328,8 @@ describe('EntityContentBlueprint', () => {
},
factory(originalFactory, { inputs, config }) {
return originalFactory({
defaultPath: '/test',
defaultTitle: 'Test',
path: '/test',
title: 'Test',
loader: async () => (
<div data-testid="test">
config: {config.mock}
@@ -64,38 +64,45 @@ export const EntityContentBlueprint = createExtensionBlueprint({
},
},
*factory(
{
loader,
defaultPath,
defaultTitle,
defaultGroup,
filter,
routeRef,
}: {
params: {
/**
* @deprecated Use the `path` param instead.
*/
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
/**
* @deprecated Use the `path` param instead.
*/
defaultTitle?: [Error: `Use the 'title' param instead`];
title: string;
/**
* @deprecated Use the `path` param instead.
*/
defaultGroup?: [Error: `Use the 'group' param instead`];
group?: keyof typeof defaultEntityContentGroups | (string & {});
loader: () => Promise<JSX.Element>;
defaultPath: string;
defaultTitle: string;
defaultGroup?: keyof typeof defaultEntityContentGroups | (string & {});
routeRef?: RouteRef;
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
},
{ node, config },
) {
const path = config.path ?? defaultPath;
const title = config.title ?? defaultTitle;
const group = config.group ?? defaultGroup;
const path = config.path ?? params.path;
const title = config.title ?? params.title;
const group = config.group ?? params.group;
yield coreExtensionData.reactElement(ExtensionBoundary.lazy(node, loader));
yield coreExtensionData.reactElement(
ExtensionBoundary.lazy(node, params.loader),
);
yield coreExtensionData.routePath(path);
yield entityContentTitleDataRef(title);
if (routeRef) {
yield coreExtensionData.routeRef(routeRef);
if (params.routeRef) {
yield coreExtensionData.routeRef(params.routeRef);
}
yield* resolveEntityFilterData(filter, config, node);
yield* resolveEntityFilterData(params.filter, config, node);
if (group) {
yield entityContentGroupDataRef(group);
@@ -82,8 +82,8 @@ describe('convertLegacyEntityContentExtension', () => {
const converted = convertLegacyEntityContentExtension(LegacyExtension, {
name: 'other',
defaultPath: '/other',
defaultTitle: 'Other',
path: '/other',
title: 'Other',
filter: 'my-filter',
});
@@ -37,8 +37,18 @@ export function convertLegacyEntityContentExtension(
overrides?: {
name?: string;
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
defaultPath?: string;
defaultTitle?: string;
path?: string;
title?: string;
/**
* @deprecated Use the `path` param instead.
*/
defaultPath?: [Error: `Use the 'path' override instead`];
/**
* @deprecated Use the `path` param instead.
*/
defaultTitle?: [Error: `Use the 'title' override instead`];
},
): ExtensionDefinition {
const element = <LegacyExtension />;
@@ -77,8 +87,8 @@ export function convertLegacyEntityContentExtension(
name: overrides?.name ?? name,
params: {
filter: overrides?.filter,
defaultPath: overrides?.defaultPath ?? `/${kebabCase(infix)}`,
defaultTitle: overrides?.defaultTitle ?? startCase(infix),
path: overrides?.path ?? `/${kebabCase(infix)}`,
title: overrides?.title ?? startCase(infix),
routeRef: mountPoint && convertLegacyRouteRef(mountPoint),
loader: async () => compatWrapper(element),
},
@@ -82,7 +82,8 @@ const _default: FrontendPlugin<
>;
inputs: {};
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
@@ -51,7 +51,7 @@ export const catalogUnprocessedEntitiesApi = ApiBlueprint.make({
/** @alpha */
export const catalogUnprocessedEntitiesPage = PageBlueprint.make({
params: {
defaultPath: '/catalog-unprocessed-entities',
path: '/catalog-unprocessed-entities',
routeRef: convertLegacyRouteRef(rootRouteRef),
loader: () =>
import('../components/UnprocessedEntities').then(m =>
+10 -5
View File
@@ -893,10 +893,13 @@ const _default: FrontendPlugin<
kind: 'entity-content';
name: 'overview';
params: {
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
defaultTitle?: [Error: `Use the 'title' param instead`];
title: string;
defaultGroup?: [Error: `Use the 'group' param instead`];
group?: keyof defaultEntityContentGroups | (string & {});
loader: () => Promise<JSX.Element>;
defaultPath: string;
defaultTitle: string;
defaultGroup?: keyof defaultEntityContentGroups | (string & {});
routeRef?: RouteRef;
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
};
@@ -1070,7 +1073,8 @@ const _default: FrontendPlugin<
kind: 'page';
name: undefined;
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
@@ -1190,7 +1194,8 @@ const _default: FrontendPlugin<
kind: 'page';
name: 'entity';
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
+3 -3
View File
@@ -47,9 +47,9 @@ export const catalogOverviewEntityContent =
},
factory: (originalFactory, { node, inputs }) => {
return originalFactory({
defaultPath: '/',
defaultTitle: 'Overview',
defaultGroup: 'overview',
path: '/',
title: 'Overview',
group: 'overview',
loader: async () => {
const LazyDefaultLayoutComponent = reactLazy(() =>
import('./DefaultEntityContentLayout').then(m => ({
+8 -8
View File
@@ -116,8 +116,8 @@ describe('Entity page', () => {
const overviewEntityContent = EntityContentBlueprint.make({
name: 'overview',
params: {
defaultPath: '/overview',
defaultTitle: 'Overview',
path: '/overview',
title: 'Overview',
loader: async () => <div>Mock Overview content</div>,
},
});
@@ -125,9 +125,9 @@ describe('Entity page', () => {
const techdocsEntityContent = EntityContentBlueprint.make({
name: 'techdocs',
params: {
defaultPath: '/techdocs',
defaultTitle: 'TechDocs',
defaultGroup: 'documentation',
path: '/techdocs',
title: 'TechDocs',
group: 'documentation',
loader: async () => <div>Mock TechDocs content</div>,
},
});
@@ -135,9 +135,9 @@ describe('Entity page', () => {
const apidocsEntityContent = EntityContentBlueprint.make({
name: 'apidocs',
params: {
defaultPath: '/apidocs',
defaultTitle: 'ApiDocs',
defaultGroup: 'documentation',
path: '/apidocs',
title: 'ApiDocs',
group: 'documentation',
loader: async () => <div>Mock ApiDocs content</div>,
},
});
+2 -2
View File
@@ -58,7 +58,7 @@ export const catalogPage = PageBlueprint.makeWithOverrides({
},
factory(originalFactory, { inputs, config }) {
return originalFactory({
defaultPath: '/catalog',
path: '/catalog',
routeRef: convertLegacyRouteRef(rootRouteRef),
loader: async () => {
const { BaseCatalogPage } = await import('../components/CatalogPage');
@@ -107,7 +107,7 @@ export const catalogEntityPage = PageBlueprint.makeWithOverrides({
},
factory(originalFactory, { config, inputs }) {
return originalFactory({
defaultPath: '/catalog/:namespace/:kind/:name',
path: '/catalog/:namespace/:kind/:name',
routeRef: convertLegacyRouteRef(entityRouteRef),
loader: async () => {
const { EntityLayout } = await import('./components/EntityLayout');
+2 -1
View File
@@ -82,7 +82,8 @@ const _default: FrontendPlugin<
>;
inputs: {};
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
+1 -1
View File
@@ -48,7 +48,7 @@ export const devToolsApi = ApiBlueprint.make({
/** @alpha */
export const devToolsPage = PageBlueprint.make({
params: {
defaultPath: '/devtools',
path: '/devtools',
routeRef: convertLegacyRouteRef(rootRouteRef),
loader: () =>
import('../components/DevToolsPage').then(m =>
+2 -1
View File
@@ -98,7 +98,8 @@ const _default: FrontendPlugin<
kind: 'page';
name: undefined;
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
+1 -1
View File
@@ -54,7 +54,7 @@ const homePage = PageBlueprint.makeWithOverrides({
},
factory: (originalFactory, { inputs }) => {
return originalFactory({
defaultPath: '/home',
path: '/home',
routeRef: rootRouteRef,
loader: () =>
import('./components/').then(m =>
+8 -4
View File
@@ -153,10 +153,13 @@ const _default: FrontendPlugin<
>;
inputs: {};
params: {
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
defaultTitle?: [Error: `Use the 'title' param instead`];
title: string;
defaultGroup?: [Error: `Use the 'group' param instead`];
group?: keyof defaultEntityContentGroups | (string & {});
loader: () => Promise<JSX.Element>;
defaultPath: string;
defaultTitle: string;
defaultGroup?: keyof defaultEntityContentGroups | (string & {});
routeRef?: RouteRef;
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
};
@@ -182,7 +185,8 @@ const _default: FrontendPlugin<
>;
inputs: {};
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
@@ -21,9 +21,9 @@ import { isKubernetesAvailable } from '../Router';
export const entityKubernetesContent = EntityContentBlueprint.make({
name: 'kubernetes',
params: {
defaultPath: '/kubernetes',
defaultTitle: 'Kubernetes',
defaultGroup: 'deployment',
path: '/kubernetes',
title: 'Kubernetes',
group: 'deployment',
filter: isKubernetesAvailable,
loader: () =>
import('./KubernetesContentPage').then(m =>
+1 -1
View File
@@ -23,7 +23,7 @@ import { rootCatalogKubernetesRouteRef } from '../plugin';
export const kubernetesPage = PageBlueprint.make({
params: {
defaultPath: '/kubernetes',
path: '/kubernetes',
// you can reuse the existing routeRef
// by wrapping into the convertLegacyRouteRef.
routeRef: convertLegacyRouteRef(rootCatalogKubernetesRouteRef),
+2 -1
View File
@@ -60,7 +60,8 @@ const _default: FrontendPlugin<
>;
inputs: {};
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
+1 -1
View File
@@ -30,7 +30,7 @@ import { NotificationsClient, notificationsApiRef } from './api';
const page = PageBlueprint.make({
params: {
defaultPath: '/notifications',
path: '/notifications',
routeRef: convertLegacyRouteRef(rootRouteRef),
loader: () =>
import('./components/NotificationsPage').then(m => (
+2 -1
View File
@@ -231,7 +231,8 @@ const _default: FrontendPlugin<
kind: 'page';
name: undefined;
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
+1 -1
View File
@@ -46,7 +46,7 @@ export const scaffolderPage = PageBlueprint.makeWithOverrides({
);
return originalFactory({
routeRef: convertLegacyRouteRef(rootRouteRef),
defaultPath: '/create',
path: '/create',
loader: () =>
import('../components/Router/Router').then(m =>
compatWrapper(
@@ -73,7 +73,7 @@ describe('SearchFilterBlueprint', () => {
},
factory(originalFactory, { inputs }) {
return originalFactory({
defaultPath: '/',
path: '/',
loader: async () => {
const searchFilters = inputs.searchFilters.map(
t => t.get(searchFilterDataRef).component,
@@ -77,7 +77,7 @@ describe('SearchFilterResultTypeBlueprint', () => {
},
factory(originalFactory, { inputs }) {
return originalFactory({
defaultPath: '/',
path: '/',
loader: async () => {
const resultTypes = inputs.resultTypes.map(t =>
t.get(searchResultTypeDataRef),
@@ -91,7 +91,7 @@ describe('SearchResultListItemBlueprint', () => {
},
factory(originalFactory, { inputs }) {
return originalFactory({
defaultPath: '/',
path: '/',
loader: async () => {
const items = inputs.items.map(i =>
i.get(searchResultListItemDataRef),
+4 -2
View File
@@ -134,7 +134,8 @@ const _default: FrontendPlugin<
kind: 'page';
name: undefined;
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
@@ -252,7 +253,8 @@ export const searchPage: ExtensionDefinition<{
kind: 'page';
name: undefined;
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
+1 -1
View File
@@ -115,7 +115,7 @@ export const searchPage = PageBlueprint.makeWithOverrides({
},
factory(originalFactory, { config, inputs }) {
return originalFactory({
defaultPath: '/search',
path: '/search',
routeRef: convertLegacyRouteRef(rootRouteRef),
loader: async () => {
const getResultItemComponent = (result: SearchResult) => {
+10 -5
View File
@@ -176,10 +176,13 @@ const _default: FrontendPlugin<
kind: 'entity-content';
name: undefined;
params: {
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
defaultTitle?: [Error: `Use the 'title' param instead`];
title: string;
defaultGroup?: [Error: `Use the 'group' param instead`];
group?: keyof defaultEntityContentGroups | (string & {});
loader: () => Promise<JSX.Element>;
defaultPath: string;
defaultTitle: string;
defaultGroup?: keyof defaultEntityContentGroups | (string & {});
routeRef?: RouteRef;
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
};
@@ -265,7 +268,8 @@ const _default: FrontendPlugin<
>;
inputs: {};
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
@@ -303,7 +307,8 @@ const _default: FrontendPlugin<
kind: 'page';
name: 'reader';
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
+4 -4
View File
@@ -137,7 +137,7 @@ export const techDocsSearchResultListItemExtension =
*/
const techDocsPage = PageBlueprint.make({
params: {
defaultPath: '/docs',
path: '/docs',
routeRef: convertLegacyRouteRef(rootRouteRef),
loader: () =>
import('../home/components/TechDocsIndexPage').then(m =>
@@ -165,7 +165,7 @@ const techDocsReaderPage = PageBlueprint.makeWithOverrides({
});
return originalFactory({
defaultPath: '/docs/:namespace/:kind/:name',
path: '/docs/:namespace/:kind/:name',
routeRef: convertLegacyRouteRef(rootDocsRouteRef),
loader: async () =>
await import('../Router').then(({ TechDocsReaderRouter }) => {
@@ -199,8 +199,8 @@ const techDocsEntityContent = EntityContentBlueprint.makeWithOverrides({
factory(originalFactory, context) {
return originalFactory(
{
defaultPath: 'docs',
defaultTitle: 'TechDocs',
path: 'docs',
title: 'TechDocs',
routeRef: convertLegacyRouteRef(rootCatalogDocsRouteRef),
loader: () =>
import('../Router').then(({ EmbeddedDocsRouter }) => {
+2 -1
View File
@@ -70,7 +70,8 @@ const _default: FrontendPlugin<
kind: 'page';
name: undefined;
params: {
defaultPath: string;
defaultPath?: [Error: `Use the 'path' param instead`];
path: string;
loader: () => Promise<JSX.Element>;
routeRef?: RouteRef;
};
+1 -1
View File
@@ -39,7 +39,7 @@ const userSettingsPage = PageBlueprint.makeWithOverrides({
},
factory(originalFactory, { inputs }) {
return originalFactory({
defaultPath: '/settings',
path: '/settings',
routeRef: convertLegacyRouteRef(settingsRouteRef),
loader: () =>
import('./components/SettingsPage').then(m =>