Merge pull request #2562 from spotify/rugvip/api

backend: change the default backend plugin mount point to /api
This commit is contained in:
Patrik Oldsberg
2020-09-24 15:58:12 +02:00
committed by GitHub
22 changed files with 68 additions and 60 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ describe('App', () => {
baseUrl: 'http://localhost:3003',
},
techdocs: {
storageUrl: 'http://localhost:7000/techdocs/static/docs',
storageUrl: 'http://localhost:7000/api/techdocs/static/docs',
},
},
context: 'test',
-12
View File
@@ -16,11 +16,8 @@
import {
errorApiRef,
discoveryApiRef,
UrlPatternDiscovery,
githubAuthApiRef,
createApiFactory,
configApiRef,
} from '@backstage/core';
import {
@@ -38,15 +35,6 @@ import {
} from '@roadiehq/backstage-plugin-github-pull-requests';
export const apis = [
// TODO(Rugvip): migrate to use /api
createApiFactory({
api: discoveryApiRef,
deps: { configApi: configApiRef },
factory: ({ configApi }) =>
UrlPatternDiscovery.compile(
`${configApi.getString('backend.baseUrl')}/{{ pluginId }}`,
),
}),
createApiFactory({
api: graphQlBrowseApiRef,
deps: { errorApi: errorApiRef, githubAuthApi: githubAuthApiRef },