mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
feat(core): Export OpenAPI spec for external tools (#5294)
The generated spec is available at /api/v1/openapi.yml
This commit is contained in:
parent
4bd9ed675e
commit
5cb7e5007d
|
@ -49,6 +49,10 @@ async function createApiRouter(
|
|||
);
|
||||
}
|
||||
|
||||
apiController.get(`/${publicApiEndpoint}/${version}/openapi.yml`, (req, res) => {
|
||||
res.sendFile(openApiSpecPath);
|
||||
});
|
||||
|
||||
apiController.use(
|
||||
`/${publicApiEndpoint}/${version}`,
|
||||
express.json(),
|
||||
|
|
Loading…
Reference in a new issue