File tree Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Expand file tree Collapse file tree 1 file changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -146,13 +146,8 @@ function build (schema, options) {
146
146
return ${ main }
147
147
`
148
148
149
- const dependencies = [ ]
150
- const dependenciesName = [ ]
151
- if ( dependsOnAjv ( schema ) ) {
152
- dependencies . push ( new Ajv ( options . ajv ) )
153
- dependenciesName . push ( 'ajv' )
154
- }
155
-
149
+ const dependencies = [ new Ajv ( options . ajv ) ]
150
+ const dependenciesName = [ 'ajv' ]
156
151
dependenciesName . push ( code )
157
152
158
153
if ( options . debugMode ) {
@@ -223,23 +218,6 @@ function inferTypeByKeyword (schema) {
223
218
return schema . type
224
219
}
225
220
226
- function dependsOnAjv ( schema ) {
227
- const str = JSON . stringify ( schema )
228
- switch ( true ) {
229
- case / " i f " : { .* " t h e n " : { / . test ( str ) :
230
- case / " ( a n y O f | o n e O f ) " : \[ / . test ( str ) :
231
- case / " c o n s t " / . test ( str ) :
232
- case / " \$ r e f " / . test ( str ) :
233
- {
234
- return true
235
- }
236
-
237
- default : {
238
- return false
239
- }
240
- }
241
- }
242
-
243
221
const stringSerializerMap = {
244
222
'date-time' : '$asDatetime' ,
245
223
date : '$asDate' ,
You can’t perform that action at this time.
0 commit comments