@backstage/plugin-api-docs 0.0.0-nightly-20260409031723 → 0.0.0-nightly-20260410031841

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,19 +1,20 @@
1
1
  # @backstage/plugin-api-docs
2
2
 
3
- ## 0.0.0-nightly-20260409031723
3
+ ## 0.0.0-nightly-20260410031841
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - da17844: Update readme to add instructions for custom api base URL
7
8
  - Updated dependencies
8
- - @backstage/ui@0.0.0-nightly-20260409031723
9
- - @backstage/plugin-catalog@0.0.0-nightly-20260409031723
10
- - @backstage/core-components@0.0.0-nightly-20260409031723
11
- - @backstage/plugin-catalog-react@0.0.0-nightly-20260409031723
12
- - @backstage/frontend-plugin-api@0.0.0-nightly-20260409031723
13
- - @backstage/catalog-model@0.0.0-nightly-20260409031723
14
- - @backstage/core-plugin-api@0.0.0-nightly-20260409031723
15
- - @backstage/plugin-catalog-common@0.0.0-nightly-20260409031723
16
- - @backstage/plugin-permission-react@0.0.0-nightly-20260409031723
9
+ - @backstage/ui@0.0.0-nightly-20260410031841
10
+ - @backstage/plugin-catalog@0.0.0-nightly-20260410031841
11
+ - @backstage/core-components@0.0.0-nightly-20260410031841
12
+ - @backstage/plugin-catalog-react@0.0.0-nightly-20260410031841
13
+ - @backstage/frontend-plugin-api@0.0.0-nightly-20260410031841
14
+ - @backstage/catalog-model@0.0.0-nightly-20260410031841
15
+ - @backstage/core-plugin-api@0.0.0-nightly-20260410031841
16
+ - @backstage/plugin-catalog-common@0.0.0-nightly-20260410031841
17
+ - @backstage/plugin-permission-react@0.0.0-nightly-20260410031841
17
18
 
18
19
  ## 0.13.6-next.2
19
20
 
package/README.md CHANGED
@@ -340,6 +340,34 @@ import { ApiExplorerPage } from '@backstage/plugin-api-docs';
340
340
  />;
341
341
  ```
342
342
 
343
+ ## Troubleshooting
344
+
345
+ ### "Try it out" sends requests to the wrong host
346
+
347
+ If the **Try it out** feature in the OpenAPI widget sends requests to your Backstage app's URL instead of the actual API host, the OpenAPI spec is missing a `servers` entry.
348
+ When no `servers` field is present, Swagger UI falls back to `window.location.origin` — the current page's host — as the base URL for all requests.
349
+
350
+ **Fix**: add a `servers` field to your API entity's `spec.definition`:
351
+
352
+ ```yaml
353
+ # catalog-info.yaml
354
+ apiVersion: backstage.io/v1alpha1
355
+ kind: API
356
+ metadata:
357
+ name: my-api
358
+ spec:
359
+ type: openapi
360
+ definition: |
361
+ openapi: "3.0.0"
362
+ info:
363
+ title: My API
364
+ version: v1
365
+ servers:
366
+ - url: https://api.example.com/v1 # ← specify your api base URL
367
+ ```
368
+
369
+ If you cannot modify the spec (e.g. it is generated or fetched from an external source), you can work around this by adding a `requestInterceptor` that rewrites the URL — see [Adding `requestInterceptor` to Swagger UI](#adding-requestinterceptor-to-swagger-ui) above.
370
+
343
371
  ## Old Frontend System
344
372
 
345
373
  If your Backstage app uses the old frontend system, you need to manually wire the plugin into your app as outlined in this section. If you are on the new frontend system, you can skip this.
@@ -1,5 +1,5 @@
1
1
  var name = "@backstage/plugin-api-docs";
2
- var version = "0.0.0-nightly-20260409031723";
2
+ var version = "0.0.0-nightly-20260410031841";
3
3
  var description = "A Backstage plugin that helps represent API entities in the frontend";
4
4
  var backstage = {
5
5
  role: "frontend-plugin",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-api-docs",
3
- "version": "0.0.0-nightly-20260409031723",
3
+ "version": "0.0.0-nightly-20260410031841",
4
4
  "description": "A Backstage plugin that helps represent API entities in the frontend",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",
@@ -66,15 +66,15 @@
66
66
  },
67
67
  "dependencies": {
68
68
  "@asyncapi/react-component": "^2.3.3",
69
- "@backstage/catalog-model": "0.0.0-nightly-20260409031723",
70
- "@backstage/core-components": "0.0.0-nightly-20260409031723",
71
- "@backstage/core-plugin-api": "0.0.0-nightly-20260409031723",
72
- "@backstage/frontend-plugin-api": "0.0.0-nightly-20260409031723",
73
- "@backstage/plugin-catalog": "0.0.0-nightly-20260409031723",
74
- "@backstage/plugin-catalog-common": "0.0.0-nightly-20260409031723",
75
- "@backstage/plugin-catalog-react": "0.0.0-nightly-20260409031723",
76
- "@backstage/plugin-permission-react": "0.0.0-nightly-20260409031723",
77
- "@backstage/ui": "0.0.0-nightly-20260409031723",
69
+ "@backstage/catalog-model": "0.0.0-nightly-20260410031841",
70
+ "@backstage/core-components": "0.0.0-nightly-20260410031841",
71
+ "@backstage/core-plugin-api": "0.0.0-nightly-20260410031841",
72
+ "@backstage/frontend-plugin-api": "0.0.0-nightly-20260410031841",
73
+ "@backstage/plugin-catalog": "0.0.0-nightly-20260410031841",
74
+ "@backstage/plugin-catalog-common": "0.0.0-nightly-20260410031841",
75
+ "@backstage/plugin-catalog-react": "0.0.0-nightly-20260410031841",
76
+ "@backstage/plugin-permission-react": "0.0.0-nightly-20260410031841",
77
+ "@backstage/ui": "0.0.0-nightly-20260410031841",
78
78
  "@graphiql/react": "0.29.0",
79
79
  "@material-ui/core": "^4.12.2",
80
80
  "@material-ui/icons": "^4.9.1",
@@ -86,11 +86,11 @@
86
86
  "swagger-ui-react": "^5.27.1"
87
87
  },
88
88
  "devDependencies": {
89
- "@backstage/cli": "0.0.0-nightly-20260409031723",
90
- "@backstage/core-app-api": "0.0.0-nightly-20260409031723",
91
- "@backstage/dev-utils": "0.0.0-nightly-20260409031723",
92
- "@backstage/frontend-test-utils": "0.0.0-nightly-20260409031723",
93
- "@backstage/test-utils": "0.0.0-nightly-20260409031723",
89
+ "@backstage/cli": "0.0.0-nightly-20260410031841",
90
+ "@backstage/core-app-api": "0.0.0-nightly-20260410031841",
91
+ "@backstage/dev-utils": "0.0.0-nightly-20260410031841",
92
+ "@backstage/frontend-test-utils": "0.0.0-nightly-20260410031841",
93
+ "@backstage/test-utils": "0.0.0-nightly-20260410031841",
94
94
  "@testing-library/dom": "^10.0.0",
95
95
  "@testing-library/jest-dom": "^6.0.0",
96
96
  "@testing-library/react": "^16.0.0",