.minimum(subtypeModel.getMinimum()) .minItems(subtypeModel.getMinItems()) .minLength(subtypeModel.getMinLength()) .minProperties(subtypeModel.getMinProperties()) .multipleOf(subtypeModel.getMultipleOf())
/** * Retrieves the minLength of a property * * @return the minLength of the property */ public Optional<Integer> getMinlength() { return Optional.ofNullable(property.getMinLength()); }
} else if(ModelUtils.isStringSchema(schema)) { StringBuilder sb = new StringBuilder("binary("); Integer min = schema.getMinLength(); Integer max = schema.getMaxLength(); if(min != null) sb.append(min);
public void addPropertiesFromRef(Schema refSchema, CodegenProperty codegenProperty) { final Map<String, Schema> allSchemas = this.openAPI.getComponents().getSchemas(); if (allSchemas == null || allSchemas.isEmpty()) { return; } final Schema schema = allSchemas.get(getSimpleRef(refSchema.get$ref())); if (schema == null) { return; } codegenProperty.pattern = schema.getPattern(); codegenProperty.minLength = schema.getMinLength(); codegenProperty.maxLength = schema.getMaxLength(); if (codegenProperty.pattern != null || codegenProperty.minLength != null || codegenProperty.maxLength != null) { codegenProperty.getVendorExtensions().put(HAS_VALIDATION_EXT_NAME, Boolean.TRUE); } }
codegenProperty.minLength = propertySchema.getMinLength(); codegenProperty.pattern = toRegularExpression(propertySchema.getPattern());
codegenParameter.exclusiveMinimum = parameterSchema.getExclusiveMinimum() == null ? false : parameterSchema.getExclusiveMinimum(); codegenParameter.maxLength = parameterSchema.getMaxLength(); codegenParameter.minLength = parameterSchema.getMinLength(); codegenParameter.pattern = toRegularExpression(parameterSchema.getPattern()); codegenParameter.maxItems = parameterSchema.getMaxItems();
codegenProperty.minLength = propertySchema.getMinLength(); codegenProperty.pattern = toRegularExpression(propertySchema.getPattern());
codegenParameter.exclusiveMinimum = propertySchema.getExclusiveMinimum() == null ? false : propertySchema.getExclusiveMinimum(); codegenParameter.maxLength = propertySchema.getMaxLength(); codegenParameter.minLength = propertySchema.getMinLength(); codegenParameter.pattern = toRegularExpression(propertySchema.getPattern()); codegenParameter.maxItems = propertySchema.getMaxItems();
codegenParameter.exclusiveMinimum = parameterSchema.getExclusiveMinimum() == null ? false : parameterSchema.getExclusiveMinimum(); codegenParameter.maxLength = parameterSchema.getMaxLength(); codegenParameter.minLength = parameterSchema.getMinLength(); codegenParameter.pattern = toRegularExpression(parameterSchema.getPattern()); codegenParameter.maxItems = parameterSchema.getMaxItems();
codegenParameter.exclusiveMinimum = parameterSchema.getExclusiveMinimum() == null ? false : parameterSchema.getExclusiveMinimum(); codegenParameter.maxLength = parameterSchema.getMaxLength(); codegenParameter.minLength = parameterSchema.getMinLength(); codegenParameter.pattern = toRegularExpression(parameterSchema.getPattern()); codegenParameter.maxItems = parameterSchema.getMaxItems();
property.minLength = p.getMinLength(); property.pattern = toRegularExpression(p.getPattern());
.minimum(subtypeModel.getMinimum()) .minItems(subtypeModel.getMinItems()) .minLength(subtypeModel.getMinLength()) .minProperties(subtypeModel.getMinProperties()) .multipleOf(subtypeModel.getMultipleOf())
case "string": StringSchema stringSchema = new StringSchema(); stringSchema.setMinLength(queryParameter.getSchema().getMinLength()); stringSchema.setMaxLength(queryParameter.getSchema().getMaxLength()); stringSchema.setPattern(queryParameter.getSchema().getPattern());
composedSchema.setMinimum(schema.getMinimum()); composedSchema.setMinItems(schema.getMinItems()); composedSchema.setMinLength(schema.getMinLength()); composedSchema.setMinProperties(schema.getMinProperties()); composedSchema.setMultipleOf(schema.getMultipleOf());