diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx index 59f107c70d..360eca6152 100644 --- a/packages/app/src/App.tsx +++ b/packages/app/src/App.tsx @@ -117,7 +117,7 @@ const app = createApp({ catalogEntity: catalogPlugin.routes.catalogEntity, }); bind(apiDocsPlugin.externalRoutes, { - createComponent: scaffolderPlugin.routes.root, + registerComponent: catalogImportPlugin.routes.importPage, }); bind(explorePlugin.externalRoutes, { catalogEntity: catalogPlugin.routes.catalogEntity, diff --git a/plugins/api-docs/src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx b/plugins/api-docs/src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx index 5ddda96daa..d38383f004 100644 --- a/plugins/api-docs/src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx +++ b/plugins/api-docs/src/components/ApiExplorerPage/DefaultApiExplorerPage.tsx @@ -42,7 +42,7 @@ import { UserListPicker, } from '@backstage/plugin-catalog-react'; import React from 'react'; -import { createComponentRouteRef } from '../../routes'; +import { registerComponentRouteRef } from '../../routes'; const defaultColumns: TableColumn[] = [ CatalogTable.columns.createNameColumn({ defaultKind: 'API' }), @@ -77,7 +77,7 @@ export const DefaultApiExplorerPage = ({ const generatedSubtitle = `${ configApi.getOptionalString('organization.name') ?? 'Backstage' } API Explorer`; - const createComponentLink = useRouteRef(createComponentRouteRef); + const registerComponentLink = useRouteRef(registerComponentRouteRef); return ( All your APIs diff --git a/plugins/api-docs/src/plugin.ts b/plugins/api-docs/src/plugin.ts index 61695b4a7a..4b69cc85ff 100644 --- a/plugins/api-docs/src/plugin.ts +++ b/plugins/api-docs/src/plugin.ts @@ -17,7 +17,7 @@ import { ApiEntity } from '@backstage/catalog-model'; import { defaultDefinitionWidgets } from './components/ApiDefinitionCard'; import { apiDocsConfigRef } from './config'; -import { createComponentRouteRef, rootRoute } from './routes'; +import { registerComponentRouteRef, rootRoute } from './routes'; import { createApiFactory, createComponentExtension, @@ -45,7 +45,7 @@ export const apiDocsPlugin = createPlugin({ }), ], externalRoutes: { - createComponent: createComponentRouteRef, + registerComponent: registerComponentRouteRef, }, }); diff --git a/plugins/api-docs/src/routes.ts b/plugins/api-docs/src/routes.ts index b7c152889e..2103672eb0 100644 --- a/plugins/api-docs/src/routes.ts +++ b/plugins/api-docs/src/routes.ts @@ -23,7 +23,7 @@ export const rootRoute = createRouteRef({ id: 'api-docs', }); -export const createComponentRouteRef = createExternalRouteRef({ - id: 'create-component', +export const registerComponentRouteRef = createExternalRouteRef({ + id: 'register-component', optional: true, });