-
Story
-
Resolution: Won't Do
-
Undefined
-
None
-
None
-
None
-
False
-
-
False
-
-
To create an express router that uses openapi spec we want to use backend-openapi-utils plugin.
The readme is outdated/wrong.
The command `yarn --cwd <package-dir> backstage-cli package schema openapi generate` doesn't work.
What it is necessary to do is `yarn add @backstage/repo-tools` and then `yarn backstage-repo-tools schema openapi generate`.
This plugin accepts only `openapi.yaml` (no json) and it must be placed in `src/schema` folder.
The problem is that this command must be executed from the root dir (`backstage-plugin`).
By default, it scans all the plugins and reads all the `src/schema/openapi.yaml` files, but it is possible to set a specific path:
`yarn backstage-repo-tools schema openapi generate plugins/orchestrator-backend` to scan only our plugin.
I didn't find a way to execute this command inside our plugin folder (`backstage-plugins/plugins/orchestrator-backend`). `cwd` is not effective because `@backstage/backend-openapi-utils` uses backstage-repo-tools that scan for the root folder here
Goals:
- Enhance the repo-tools to accept custom directory
- Enhance the backend-openapi-utils according to changes in the previous point
- blocks
-
FLPATH-678 Add openapi generator for orchestrator backend
- Closed