Skip to content

Commit

Permalink
#10125 fix DefaultCodegen parsing to handle 'uniqueItems' flag
Browse files Browse the repository at this point in the history
  • Loading branch information
akshpan committed Feb 1, 2021
1 parent bdec255 commit f8c7943
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 f8c7943

Please sign in to comment.