Skip to content

Commit

Permalink
Merge pull request #10154 from akshpan/issue-10125
Browse files Browse the repository at this point in the history
#10125 fix DefaultCodegen parsing to handle 'uniqueItems' flag
  • Loading branch information
HugoMario authored Feb 6, 2021
2 parents bdec255 + f8c7943 commit a4b766b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public class CodegenProperty implements Cloneable {
public String enumName;
public Integer maxItems;
public Integer minItems;
public boolean uniqueItems;

// XML
public boolean isXmlAttribute = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1932,6 +1932,7 @@ private CodegenProperty fromProperty(String name, Property p, Integer itemsDepth
ArrayProperty ap = (ArrayProperty) p;
property.maxItems = ap.getMaxItems();
property.minItems = ap.getMinItems();
property.uniqueItems = ap.getUniqueItems() == null ? false : ap.getUniqueItems();
String itemName = (String) p.getVendorExtensions().get("x-item-name");
if (itemName == null) {
itemName = property.name;
Expand Down

0 comments on commit a4b766b

Please sign in to comment.