Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ function addPatternProperties (location) {
}

function additionalProperty (location) {
let ap = location.schema.additionalProperties
const ap = location.schema.additionalProperties
let code = ''
if (ap === true) {
code += `
Expand All @@ -309,10 +309,10 @@ function additionalProperty (location) {

return code
}

let apLocation = mergeLocation(location, 'additionalProperties')
if (ap.$ref) {
apLocation = resolveRef(location, ap.$ref)
ap = apLocation.schema
if (apLocation.schema.$ref) {
apLocation = resolveRef(apLocation, apLocation.schema.$ref)
}

const valueCode = buildValue(apLocation, 'obj[keys[i]]')
Expand Down