UNPKG
egg-swagger-doc-fixbug
Version:
latest (2.3.3)
2.3.3
swagger for egg
github.com/best-fan/egg-swagger-doc-fix
best-fan/egg-swagger-doc-fix
egg-swagger-doc-fixbug
/
app
/
extend
/
context.js
15 lines
(11 loc)
•
261 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'use strict'
;
const
{ getValidateRuler } =
require
(
'../../lib/contract/index'
);
const
RULE
=
Symbol
(
'Context#rule'
);
module
.
exports
= {
get
rule
() {
if
(!
this
[
RULE
]) {
this
[
RULE
] =
getValidateRuler
(
this
.
app
); }
return
this
[
RULE
]; }, };