npm install @opi_pib/node-openapi
openapi build spec --source=./docs/index.json --dist=./dist/openapi.json
openapi serve editor --port=3010 --host=http://localhost --source=./dist/openapi.json --basePath=/v1
openapi serve spec --port=3011 --host=http://localhost --source=./dist/openapi.json
openapi serve spec
openapi build typescript --source=http://localhost:3011 --dist=./src/rest/api --typesOnly=true
{
basePath: '/v1',
host: 'http://localhost',
port: {
editor: '3010',
spec: '3011'
},
dist: {
folder: './dist',
fileName: 'index'
},
sourceUrl: './src/docs/index.json',
typescript: {
dist: './src/rest/api',
typesOnly: true,
services: false,
promises: false
}
};