forked from loafle/openapi-generator-original
merged from #271
This commit is contained in:
parent
2dd73872a4
commit
eb6c09bfce
@ -1,13 +1,18 @@
|
||||
package com.wordnik.swagger.codegen;
|
||||
|
||||
import com.wordnik.swagger.models.*;
|
||||
import com.wordnik.swagger.models.properties.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public class CodegenProperty {
|
||||
public String baseName, complexType, getter, setter, description, datatype,
|
||||
name, min, max, defaultValue, baseType, containerType;
|
||||
|
||||
/** maxLength validation for strings, see http://json-schema.org/latest/json-schema-validation.html#rfc.section.5.2.1 */
|
||||
public Integer maxLength;
|
||||
/** minLength validation for strings, see http://json-schema.org/latest/json-schema-validation.html#rfc.section.5.2.2 */
|
||||
public Integer minLength;
|
||||
/** pattern validation for strings, see http://json-schema.org/latest/json-schema-validation.html#rfc.section.5.2.3 */
|
||||
public String pattern;
|
||||
|
||||
public Double minimum, maximum, exclusiveMinimum, exclusiveMaximum;
|
||||
public Boolean hasMore = null, required = null, secondaryParam = null;
|
||||
public Boolean isPrimitiveType, isContainer, isNotContainer;
|
||||
|
@ -412,6 +412,9 @@ public class DefaultCodegen {
|
||||
|
||||
if(p instanceof StringProperty) {
|
||||
StringProperty sp = (StringProperty) p;
|
||||
property.maxLength = sp.getMaxLength();
|
||||
property.minLength = sp.getMinLength();
|
||||
property.pattern = sp.getPattern();
|
||||
if(sp.getEnum() != null) {
|
||||
List<String> _enum = sp.getEnum();
|
||||
property._enum = _enum;
|
||||
|
Loading…
x
Reference in New Issue
Block a user