1.2.9 • Published 4 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
4 years ago
1.2.8
4 years ago
1.2.7
4 years ago
1.2.6
4 years ago
1.2.5
4 years ago
1.2.4
4 years ago
1.2.3
4 years ago
1.2.2
4 years ago
1.2.1
4 years ago
1.2.0
4 years ago
1.1.9
4 years ago
1.1.8
4 years ago
1.1.7
4 years ago
1.1.6
4 years ago
1.1.5
4 years ago
1.1.4
4 years ago
1.1.3
4 years ago
1.1.2
4 years ago
1.1.1
4 years ago
1.1.0
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago