1.2.9 • Published 5 years ago
packopenapi v1.2.9
Packopenapi
Installation
$npm install packopenapi
Usage
add line to main:
app.use('/dist',express.static(path.join(__dirname,'..','node_modules/packopenapi/dist')));
const {genHtml} = require('packopenapi');
const gen = genHtml('urlyaml.yaml','urlscript.js,'cssscript.css');
ex:
const gen = genHtml('../dist/yamls/AuthController.yaml','test.js');
router.get('/',(req,res)=>{
res.send(gen);
})
Keywords
openapi swagger 3.0 nodejs npm
More
if you want login auto return key u can add url authentication in genHtm;
ex:
const urlAuthentication = 'http://localhost:3000/api/v1/managers/login'
const gen = genHtml('./yamls/ShopController.json',undefined,undefined,urlAuthentication);
config in document file:
securitySchemes: {
bearerAuth:{
type: http,
scheme: bearer,
bearerFormat: JWT
},
basicAuth:{
type: http,
scheme: basic
}
}
1.2.9
5 years ago
1.2.8
5 years ago
1.2.7
5 years ago
1.2.6
5 years ago
1.2.5
5 years ago
1.2.4
5 years ago
1.2.3
5 years ago
1.2.2
5 years ago
1.2.1
5 years ago
1.2.0
5 years ago
1.1.9
5 years ago
1.1.8
5 years ago
1.1.7
5 years ago
1.1.6
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago