Skip to content

Commit

Permalink
Improved handling for additionalProperties holding a boolean.
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed Aug 7, 2018
1 parent 1f20b95 commit ef3c532
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/models/Schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,14 @@ function buildFields(
sortByRequired(fields, schema.required);
}

if (typeof additionalProps === 'object' || typeof additionalProps === 'boolean') {
if (typeof additionalProps === 'object' || additionalProps === true) {
fields.push(
new FieldModel(
parser,
{
name: 'property name *',
required: false,
schema: additionalProps,
schema: additionalProps === true ? {} : additionalProps,
kind: 'additionalProperties',
},
$ref + '/additionalProperties',
Expand Down

0 comments on commit ef3c532

Please sign in to comment.