@dweber019/backstage-plugin-api-docs-module-wsdl-backend
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

@dweber019/backstage-plugin-api-docs-module-wsdl-doc-backend

Backend for the @dweber019/backstage-plugin-api-docs-module-wsdl frontend plugin. Assists in converting WSDL to HTML.

Setup

yarn add --cwd packages/backend @dweber019/backstage-plugin-api-docs-module-wsdl-backend

Then integrate the plugin using the following default setup for src/plugins/apiDocsModuleWsdl.ts:

import { Router } from 'express';
import { createRouter } from '@dweber019/backstage-plugin-api-docs-module-wsdl-backend';
import { PluginEnvironment } from '../types';

export default async function createPlugin(
  env: PluginEnvironment,
): Promise<Router> {
  return await createRouter(env);
}

And then add to packages/backend/src/index.ts:

// In packages/backend/src/index.ts
import apiDocsModuleWsdlDoc from './plugins/apiDocsModuleWsdl';
// ...
async function main() {
  // ...
  const apiDocsModuleWsdlDocEnv = useHotMemoize(module, () => createEnv('apiDocsModuleWsdl'));
  // ...
  apiRouter.use('/api-docs-module-wsdl', await apiDocsModuleWsdlDoc(apiDocsModuleWsdlDocEnv));

New Backend System

The backend plugin has support for the new backend system, here's how you can set that up:

In your packages/backend/src/index.ts make the following changes:

import { createBackend } from '@backstage/backend-defaults';

backend.add(import('@dweber019/backstage-plugin-api-docs-module-wsdl-backend'));

backend.start();

Development

This plugin is based on the work of the wsdl-viewer and uses SaxonJS for the XSLT transformation.

If you like to future improve the XSLT you have to make changes to ./wsdl-viewer.xsl and convert it to a SEF file.

xslt3 -t -xsl:./wsdl-viewer.xsl -export:./src/stylesheet.sef.json -nogo

Local development

There is a local setup at plugins/api-docs-module-wsdl-backend/dev which can be started with yarn --cwd plugins/api-docs-module-wsdl-backend start from the root.

Readme

Keywords

none

Package Sidebar

Install

npm i @dweber019/backstage-plugin-api-docs-module-wsdl-backend

Weekly Downloads

147

Version

0.0.11

License

MIT

Unpacked Size

1.45 MB

Total Files

5

Last publish

Collaborators

  • dweber019