Skip to content

Commit

Permalink
fix: fix WSDL preview on component tab
Browse files Browse the repository at this point in the history
  • Loading branch information
dweber019 committed Aug 30, 2024
1 parent b1de400 commit 0a9b433
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 836 deletions.
7 changes: 7 additions & 0 deletions .changeset/strong-dryers-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@dweber019/backstage-plugin-api-docs-module-wsdl': patch
---

Fix WSDL preview on component tab.

**BREAKING**: Because of this change the API setup has changed, see README.
7 changes: 3 additions & 4 deletions packages/app/src/apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,12 @@ export const apis: AnyApiFactory[] = [
api: apiDocsConfigRef,
deps: {},
factory: () => {
// load the default widgets
const definitionWidgets = defaultDefinitionWidgets();
// add the wsdl-docs api widget to the definition widgets
definitionWidgets.push(wsdlApiWidget);
return {
getApiDefinitionWidget: (apiEntity: ApiEntity) => {
// find the widget for the type of api entity
if (apiEntity.spec.type.toLowerCase() === 'wsdl') {
return wsdlApiWidget(apiEntity);
}
return definitionWidgets.find(d => d.type === apiEntity.spec.type);
},
};
Expand Down
11 changes: 11 additions & 0 deletions packages/entities/wsdl-api-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,14 @@ spec:
owner: foo
definition:
$text: http://www.dneonline.com/calculator.asmx?wsdl
---
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: wsdl-hello-world
spec:
type: service
lifecycle: production
owner: user:development/guest
providesApis:
- wsdl-hello-world
7 changes: 3 additions & 4 deletions plugins/api-docs-module-wsdl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@ export const apis: AnyApiFactory[] = [
api: apiDocsConfigRef,
deps: {},
factory: () => {
// load the default widgets
const definitionWidgets = defaultDefinitionWidgets();
// add the wsdl-docs api widget to the definition widgets
definitionWidgets.push(wsdlApiWidget);
return {
getApiDefinitionWidget: (apiEntity: ApiEntity) => {
// find the widget for the type of api entity
if (apiEntity.spec.type.toLowerCase() === 'wsdl') {
return wsdlApiWidget(apiEntity);
}
return definitionWidgets.find(d => d.type === apiEntity.spec.type);
},
};
Expand Down
118 changes: 0 additions & 118 deletions plugins/api-docs-module-wsdl/dev/index.tsx

This file was deleted.

70 changes: 0 additions & 70 deletions plugins/api-docs-module-wsdl/dev/wsdl-api.yaml

This file was deleted.

Loading

0 comments on commit 0a9b433

Please sign in to comment.