UNPKG
yapi-vendor
Version:
latest (1.12.0)
1.12.0
1.10.2
1.10.1
1.9.2
1.9.1
1.9.0
1.8.8
1.8.7
1.8.5
1.8.4
1.8.3
1.8.2
1.8.1
1.8.0
1.7.2
1.7.1
1.7.0
1.7.0-beta.1
1.7.0-beta.0
1.6.3
1.6.2
1.6.1
1.6.0
1.5.14
1.5.13
1.5.12
1.5.11
1.5.10
1.5.8
1.5.7
1.5.6
1.5.5
1.5.4
1.5.3
1.5.2
1.5.1
1.5.0
1.4.4
1.4.3
1.4.2
1.4.1
YAPI
github.com/YMFE/yapi
YMFE/yapi
yapi-vendor
/
exts
/
yapi-plugin-import-swagger
/
server.js
12 lines
•
291 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
module
.
exports
=
function
(
){
this
.
bindHook
(
'import_data'
,
function
(
importDataModule
){ importDataModule.
swagger
=
async
(res)=>{
try
{
return
await
require
(
'./run.js'
)(res) }
catch
(err){
this
.
commons
.
log
(err,
'error'
)
return
false
; } } }) }