Skip to content

Commit

Permalink
fix: render additionalProperties set to true (#597)
Browse files Browse the repository at this point in the history
fixes #596
  • Loading branch information
m-mohr authored and RomanHotsiy committed Aug 7, 2018
1 parent 568ce74 commit f70ac08
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') {
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 f70ac08

Please sign in to comment.