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

1.0.1 • 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 --cwd packages/backend add @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.

License

SaxonJS is free of charge but not open source, you can find the license here.

Readme

Keywords

none

Package Sidebar

Install

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

Weekly Downloads

44

Version

1.0.1

License

MIT

Unpacked Size

1.45 MB

Total Files

11

Last publish

Collaborators

  • dweber019