@opi_pib/node-openapi
v2.0.0
Published
Openapi tools
Downloads
16
Keywords
Readme
@opi_pib/node-openapi
Install
npm install @opi_pib/node-openapi
Cli commands
Display cli documentation
openapi help
Compile openapi.json from docs
openapi build spec --source=./docs/index.json --dist=./dist/openapi.json
Serve documentation in browser
openapi serve editor --port=3010 --host=http://localhost --source=./dist/openapi.json --basePath=/v1
Serve openapi.json
openapi serve spec --port=3011 --host=http://localhost --source=./dist/openapi.json
Build typescript interfaces (needs 'openapi serve spec' command running)
openapi serve spec
openapi build typescript --source=http://localhost:3011 --dist=./src/rest/api --typesOnly=true
Default config
{
basePath: '/v1',
host: 'http://localhost',
port: {
editor: '3010',
spec: '3011'
},
dist: {
folder: './dist',
fileName: 'index'
},
sourceUrl: './src/docs/index.json',
tsModelsUrl: './src/rest/api'
};