Skip to content

Commit

Permalink
Merge branch 'rodakr-master'; resolves #164;
Browse files Browse the repository at this point in the history
  • Loading branch information
sdaschner committed Jul 13, 2018
2 parents d9fde98 + c8319ce commit 7eeaf54
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,15 @@ public void visit(final TypeRepresentation.EnumTypeRepresentation representation
builder.add("type", "string");
if (!representation.getEnumValues().isEmpty()) {
final JsonArrayBuilder array = representation.getEnumValues().stream().sorted().collect(Json::createArrayBuilder, JsonArrayBuilder::add, JsonArrayBuilder::add);
builder.add("enum", array);
if (inCollection) {
builder.add("items", Json.createObjectBuilder().add("type", "string").add("enum", array).build());
} else {
builder.add("enum", array);
}

}
}

};

final TypeRepresentation representation = typeRepresentations.get(identifier);
Expand Down

0 comments on commit 7eeaf54

Please sign in to comment.