@@ -74,8 +74,8 @@ function build (schema, options) {
74
74
`
75
75
}
76
76
77
- if ( schema [ ' $ref' ] ) {
78
- schema = refFinder ( schema [ ' $ref' ] , schema , options . schema )
77
+ if ( schema . $ref ) {
78
+ schema = refFinder ( schema . $ref , schema , options . schema )
79
79
}
80
80
81
81
if ( schema . type === undefined ) {
@@ -309,8 +309,8 @@ function addPatternProperties (schema, externalSchema, fullSchema) {
309
309
if (properties[keys[i]]) continue
310
310
`
311
311
Object . keys ( pp ) . forEach ( ( regex , index ) => {
312
- if ( pp [ regex ] [ ' $ref' ] ) {
313
- pp [ regex ] = refFinder ( pp [ regex ] [ ' $ref' ] , fullSchema , externalSchema , fullSchema )
312
+ if ( pp [ regex ] . $ref ) {
313
+ pp [ regex ] = refFinder ( pp [ regex ] . $ref , fullSchema , externalSchema , fullSchema )
314
314
}
315
315
var type = pp [ regex ] . type
316
316
code += `
@@ -385,8 +385,8 @@ function additionalProperty (schema, externalSchema, fullSchema) {
385
385
}
386
386
`
387
387
}
388
- if ( ap [ ' $ref' ] ) {
389
- ap = refFinder ( ap [ ' $ref' ] , fullSchema , externalSchema )
388
+ if ( ap . $ref ) {
389
+ ap = refFinder ( ap . $ref , fullSchema , externalSchema )
390
390
}
391
391
392
392
var type = ap . type
@@ -486,8 +486,8 @@ function refFinder (ref, schema, externalSchema) {
486
486
if ( ref [ 0 ] ) {
487
487
schema = externalSchema [ ref [ 0 ] ]
488
488
489
- if ( schema [ ' $ref' ] ) {
490
- return refFinder ( schema [ ' $ref' ] , schema , externalSchema )
489
+ if ( schema . $ref ) {
490
+ return refFinder ( schema . $ref , schema , externalSchema )
491
491
}
492
492
}
493
493
@@ -532,8 +532,8 @@ function sanitizeKey (key) {
532
532
533
533
function buildCode ( schema , code , laterCode , name , externalSchema , fullSchema ) {
534
534
Object . keys ( schema . properties || { } ) . forEach ( ( key , i , a ) => {
535
- if ( schema . properties [ key ] [ ' $ref' ] ) {
536
- schema . properties [ key ] = refFinder ( schema . properties [ key ] [ ' $ref' ] , fullSchema , externalSchema )
535
+ if ( schema . properties [ key ] . $ref ) {
536
+ schema . properties [ key ] = refFinder ( schema . properties [ key ] . $ref , fullSchema , externalSchema )
537
537
}
538
538
539
539
// Using obj['key'] !== undefined instead of obj.hasOwnProperty(prop) for perf reasons,
@@ -783,8 +783,8 @@ function buildArray (schema, code, name, externalSchema, fullSchema) {
783
783
`
784
784
var laterCode = ''
785
785
786
- if ( schema . items [ ' $ref' ] ) {
787
- schema . items = refFinder ( schema . items [ ' $ref' ] , fullSchema , externalSchema )
786
+ if ( schema . items . $ref ) {
787
+ schema . items = refFinder ( schema . items . $ref , fullSchema , externalSchema )
788
788
}
789
789
790
790
var result = { code : '' , laterCode : '' }
0 commit comments