@wearefrank/backstage-plugin-openapi2frank
v1.2.0
Published
This backstage plugin generates a Frank from an OpenAPI Spec that can be used in the WeAreFrank! Framework.
Downloads
91
Readme
OpenAPI2Frank
Welcome to the OpenAPI2Frank plugin!
This plugin is used to convert OpenAPI specifications to Franks, which can be used in the Frank!Framework. It generates a zip file containing XML files of the Franks and XSD files for each endpoint of the OpenAPI specification.
This plugin was created through the Backstage CLI
Getting started
To use this plugin, you need to install it in your project.
yarn add @wearefrank/backstage-plugin-openapi2frank
If this command gives an error, try:
yarn workspace app add @wearefrank/backstage-plugin-openapi2frank
Then, you need to add it to your Backstage instance. You can do this by adding the following to your App.tsx
file:
The App.tsx
file is located at packages/app/src/App.tsx
import { OpenapiAdaptPage } from '@wearefrank/backstage-plugin-openapi2frank';
//<Flatroutes>
<Route path="/openapi-adapter" element={<OpenapiAdaptPage />} />
Add the following proxy to your app-config.yaml
file:
proxy:
endpoints:
'/openapi-frank-generator':
target: https://openapi-frank-generator.wearefrank.org/
credentials: dangerously-allow-unauthenticated
You can add a navigation item to your sidebar by adding the following to your Root.tsx
file located at packages/app/src/components/Root.tsx
,
of course you can change the icon and the text to your liking:
import PublishIcon from '@material-ui/icons/Publish';
// <SidebarGroup label="Menu" icon={<MenuIcon />}>
<SidebarItem icon={PublishIcon} to="openapi-adapter" text="API Converter" />