forked from loafle/openapi-generator-original
add hasValidation to codegenParameter
This commit is contained in:
parent
0792ddc9b4
commit
89703d86b7
@ -20,6 +20,7 @@ public class CodegenParameter {
|
|||||||
public Map<String, Object> allowableValues;
|
public Map<String, Object> allowableValues;
|
||||||
public CodegenProperty items;
|
public CodegenProperty items;
|
||||||
public Map<String, Object> vendorExtensions;
|
public Map<String, Object> vendorExtensions;
|
||||||
|
public Boolean hasValidation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines whether this parameter is mandatory. If the parameter is in "path",
|
* Determines whether this parameter is mandatory. If the parameter is in "path",
|
||||||
|
@ -1833,6 +1833,12 @@ public class DefaultCodegen {
|
|||||||
p.minItems = qp.getMinItems();
|
p.minItems = qp.getMinItems();
|
||||||
p.uniqueItems = qp.isUniqueItems();
|
p.uniqueItems = qp.isUniqueItems();
|
||||||
p.multipleOf = qp.getMultipleOf();
|
p.multipleOf = qp.getMultipleOf();
|
||||||
|
|
||||||
|
if (p.maximum != null || p.exclusiveMaximum != null ||
|
||||||
|
p.minimum != null || p.exclusiveMinimum != null ||
|
||||||
|
p.maxLength != null || p.minLength != null ||
|
||||||
|
p.maxItems != null || p.minItems != null ||
|
||||||
|
p.pattern != null ||
|
||||||
} else {
|
} else {
|
||||||
if (!(param instanceof BodyParameter)) {
|
if (!(param instanceof BodyParameter)) {
|
||||||
LOGGER.error("Cannot use Parameter " + param + " as Body Parameter");
|
LOGGER.error("Cannot use Parameter " + param + " as Body Parameter");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user