plugins: remove unnecessary use of convertLegacyRouteRef(s)
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -13,12 +13,13 @@ import { EntityPredicate } from '@backstage/plugin-catalog-react/alpha';
|
||||
import { ExtensionBlueprintParams } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionDataRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExtensionInput } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { ExternalRouteRef } from '@backstage/core-plugin-api';
|
||||
import { IconComponent } from '@backstage/frontend-plugin-api';
|
||||
import { JSX as JSX_2 } from 'react';
|
||||
import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api';
|
||||
import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/frontend-plugin-api';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api';
|
||||
import { TranslationRef } from '@backstage/frontend-plugin-api';
|
||||
|
||||
// @alpha (undocumented)
|
||||
@@ -63,7 +64,7 @@ const _default: OverridableFrontendPlugin<
|
||||
root: RouteRef<undefined>;
|
||||
},
|
||||
{
|
||||
registerApi: ExternalRouteRef<undefined>;
|
||||
registerApi: ExternalRouteRef<undefined, true>;
|
||||
},
|
||||
{
|
||||
'api:api-docs/config': OverridableExtensionDefinition<{
|
||||
@@ -346,7 +347,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -383,7 +384,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultGroup?: [Error: `Use the 'group' param instead`];
|
||||
group?: keyof defaultEntityContentGroups | (string & {});
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
|
||||
};
|
||||
}>;
|
||||
@@ -406,7 +407,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -443,7 +444,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultGroup?: [Error: `Use the 'group' param instead`];
|
||||
group?: keyof defaultEntityContentGroups | (string & {});
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
filter?: string | EntityPredicate | ((entity: Entity) => boolean);
|
||||
};
|
||||
}>;
|
||||
@@ -456,7 +457,7 @@ const _default: OverridableFrontendPlugin<
|
||||
{
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
},
|
||||
'core.nav-item.target',
|
||||
{}
|
||||
@@ -465,7 +466,7 @@ const _default: OverridableFrontendPlugin<
|
||||
params: {
|
||||
title: string;
|
||||
icon: IconComponent;
|
||||
routeRef: RouteRef<undefined>;
|
||||
routeRef: RouteRef_2<undefined>;
|
||||
};
|
||||
}>;
|
||||
'page:api-docs': OverridableExtensionDefinition<{
|
||||
@@ -483,7 +484,7 @@ const _default: OverridableFrontendPlugin<
|
||||
| ExtensionDataRef<string, 'core.routing.path', {}>
|
||||
| ExtensionDataRef<JSX_2.Element, 'core.reactElement', {}>
|
||||
| ExtensionDataRef<
|
||||
RouteRef<AnyRouteRefParams>,
|
||||
RouteRef_2<AnyRouteRefParams>,
|
||||
'core.routing.ref',
|
||||
{
|
||||
optional: true;
|
||||
@@ -504,7 +505,7 @@ const _default: OverridableFrontendPlugin<
|
||||
defaultPath?: [Error: `Use the 'path' param instead`];
|
||||
path: string;
|
||||
loader: () => Promise<JSX.Element>;
|
||||
routeRef?: RouteRef;
|
||||
routeRef?: RouteRef_2;
|
||||
};
|
||||
}>;
|
||||
}
|
||||
|
||||
@@ -23,8 +23,6 @@ import {
|
||||
createFrontendPlugin,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
|
||||
import { convertLegacyRouteRef } from '@backstage/core-compat-api';
|
||||
|
||||
import {
|
||||
ApiEntity,
|
||||
parseEntityRef,
|
||||
@@ -44,7 +42,7 @@ import {
|
||||
const apiDocsNavItem = NavItemBlueprint.make({
|
||||
params: {
|
||||
title: 'APIs',
|
||||
routeRef: convertLegacyRouteRef(rootRoute),
|
||||
routeRef: rootRoute,
|
||||
icon: () => <AppIcon id="kind:api" />,
|
||||
},
|
||||
});
|
||||
@@ -77,7 +75,7 @@ const apiDocsExplorerPage = PageBlueprint.makeWithOverrides({
|
||||
factory(originalFactory, { config }) {
|
||||
return originalFactory({
|
||||
path: '/api-docs',
|
||||
routeRef: convertLegacyRouteRef(rootRoute),
|
||||
routeRef: rootRoute,
|
||||
loader: () =>
|
||||
import('./components/ApiExplorerPage').then(m => (
|
||||
<m.ApiExplorerIndexPage
|
||||
@@ -212,10 +210,10 @@ export default createFrontendPlugin({
|
||||
pluginId: 'api-docs',
|
||||
info: { packageJson: () => import('../package.json') },
|
||||
routes: {
|
||||
root: convertLegacyRouteRef(rootRoute),
|
||||
root: rootRoute,
|
||||
},
|
||||
externalRoutes: {
|
||||
registerApi: convertLegacyRouteRef(registerComponentRouteRef),
|
||||
registerApi: registerComponentRouteRef,
|
||||
},
|
||||
extensions: [
|
||||
apiDocsNavItem,
|
||||
|
||||
Reference in New Issue
Block a user