onboard-to-openapi-server
Installation
SKILL.md
OpenAPI Onboard Plugin
Onboard an existing Backstage backend plugin to the repo's OpenAPI tooling. The core flow reverse-engineers an openapi.yaml from the plugin's existing Express router, generates a server stub via backstage-repo-tools, switches the router over to createOpenApiRouter, and verifies with yarn tsc + the package's tests.
The OpenAPI spec is the source of truth. The router is the starting point: we read it once to derive the spec, then the spec drives generation forward.
Up front: confirm scope with the user
Before writing anything, ask which of the optional steps the user wants. Default to off unless the user says yes.
| Step | Always or optional |
|---|---|
Inventory router → write openapi.yaml |
Always |
Generate server stub (--server) |
Always |
Switch router to createOpenApiRouter |
Always |
Run yarn tsc and the plugin's existing tests |
Always |
Generate a typed client (--client-package <pkg>) |
Optional — ask |
Migrate router tests to wrapServer |
Optional — ask |
| Write changesets | Optional — ask |