diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index 934fcab62f..d29a389911 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -48,8 +48,10 @@ "dependencies": { "@asyncapi/react-component": "1.2.13", "@backstage/catalog-model": "workspace:^", + "@backstage/core-compat-api": "workspace:^", "@backstage/core-components": "workspace:^", "@backstage/core-plugin-api": "workspace:^", + "@backstage/frontend-plugin-api": "workspace:^", "@backstage/plugin-catalog": "workspace:^", "@backstage/plugin-catalog-common": "workspace:^", "@backstage/plugin-catalog-react": "workspace:^", diff --git a/plugins/api-docs/src/alpha.tsx b/plugins/api-docs/src/alpha.tsx index 94adcafa53..eddd29b65d 100644 --- a/plugins/api-docs/src/alpha.tsx +++ b/plugins/api-docs/src/alpha.tsx @@ -13,3 +13,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +import { createPlugin } from '@backstage/frontend-plugin-api'; +import { convertLegacyRouteRef } from '@backstage/core-compat-api'; +import { rootRoute, registerComponentRouteRef } from './routes'; + +export default createPlugin({ + id: 'api-docs', + routes: { + root: convertLegacyRouteRef(rootRoute), + }, + externalRoutes: { + registerApi: convertLegacyRouteRef(registerComponentRouteRef), + }, + extensions: [], +}); diff --git a/yarn.lock b/yarn.lock index 93ebfa68aa..90529db61f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4556,9 +4556,11 @@ __metadata: "@backstage/catalog-model": "workspace:^" "@backstage/cli": "workspace:^" "@backstage/core-app-api": "workspace:^" + "@backstage/core-compat-api": "workspace:^" "@backstage/core-components": "workspace:^" "@backstage/core-plugin-api": "workspace:^" "@backstage/dev-utils": "workspace:^" + "@backstage/frontend-plugin-api": "workspace:^" "@backstage/plugin-catalog": "workspace:^" "@backstage/plugin-catalog-common": "workspace:^" "@backstage/plugin-catalog-react": "workspace:^"