From 7f8403952f3e304ac1c8d12ca9506b54233717de Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 8 May 2024 17:27:16 +0200 Subject: [PATCH] api-docs: add default route target Signed-off-by: Patrik Oldsberg --- .changeset/chilled-planes-sniff.md | 5 +++++ plugins/api-docs/src/routes.ts | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/chilled-planes-sniff.md diff --git a/.changeset/chilled-planes-sniff.md b/.changeset/chilled-planes-sniff.md new file mode 100644 index 0000000000..e4084ea561 --- /dev/null +++ b/.changeset/chilled-planes-sniff.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-api-docs': patch +--- + +The `registerComponent` external route will now by default bind to the catalog import page if it is available. diff --git a/plugins/api-docs/src/routes.ts b/plugins/api-docs/src/routes.ts index 2103672eb0..295a263d6d 100644 --- a/plugins/api-docs/src/routes.ts +++ b/plugins/api-docs/src/routes.ts @@ -26,4 +26,5 @@ export const rootRoute = createRouteRef({ export const registerComponentRouteRef = createExternalRouteRef({ id: 'register-component', optional: true, + defaultTarget: 'catalog-import.importPage', });