@soapjs/soap-openapi
v0.1.1
Published
OpenAPI 3 documentation plugin and collectors for SoapJS HTTP apps
Downloads
143
Readme
@soapjs/soap-openapi
OpenAPI 3 documentation for SoapJS HTTP apps: route metadata collectors, Swagger UI, and the DocumentationPlugin used by bootstrap({ docs: true }).
Install
npm install @soapjs/soap-openapi @soapjs/soap expressUsage
import { bootstrap } from '@soapjs/soap-express';
import { DocumentationPlugin } from '@soapjs/soap-openapi';
await bootstrap({
controllers: [MyController],
docs: {
info: { title: 'My API', version: '1.0.0' },
openApiPath: '/openapi.json',
interactivePath: '/docs',
},
});Pair with @soapjs/soap-contract-zod so Zod bodyContract() schemas appear in the generated spec automatically.
Peer dependencies
@soapjs/soap>= 0.12.1 (DecoratorRegistryin@soapjs/soap/http)express>= 4 (your HTTP stack, e.g.@soapjs/soap-express)
