.maximum(subtypeModel.getMaximum()) .maxItems(subtypeModel.getMaxItems()) .maxLength(subtypeModel.getMaxLength()) .maxProperties(subtypeModel.getMaxProperties()) .minimum(subtypeModel.getMinimum())
/** * Retrieves the maxLength of a property * * @return the maxLength of the property */ public Optional<Integer> getMaxlength() { return Optional.ofNullable(property.getMaxLength()); }
StringBuilder sb = new StringBuilder("binary("); Integer min = schema.getMinLength(); Integer max = schema.getMaxLength(); if(min != null) sb.append(min); if(min != null && max != null) sb.append(", ").append(max);
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.maxLength = propertySchema.getMaxLength(); codegenProperty.minLength = propertySchema.getMinLength(); codegenProperty.pattern = toRegularExpression(propertySchema.getPattern());
codegenProperty.maxLength = propertySchema.getMaxLength(); codegenProperty.minLength = propertySchema.getMinLength(); codegenProperty.pattern = toRegularExpression(propertySchema.getPattern());
codegenParameter.maxLength = parameterSchema.getMaxLength(); codegenParameter.minLength = parameterSchema.getMinLength(); codegenParameter.pattern = toRegularExpression(parameterSchema.getPattern());
codegenParameter.maxLength = propertySchema.getMaxLength(); codegenParameter.minLength = propertySchema.getMinLength(); codegenParameter.pattern = toRegularExpression(propertySchema.getPattern());
codegenParameter.maxLength = parameterSchema.getMaxLength(); codegenParameter.minLength = parameterSchema.getMinLength(); codegenParameter.pattern = toRegularExpression(parameterSchema.getPattern());
.setReadOnly(new ChangedReadOnly(left.getReadOnly(), right.getReadOnly(), context)) .setWriteOnly(new ChangedWriteOnly(left.getWriteOnly(), right.getWriteOnly(), context)) .setMaxLength(new ChangedMaxLength(left.getMaxLength(), right.getMaxLength(), context));
codegenParameter.maxLength = parameterSchema.getMaxLength(); codegenParameter.minLength = parameterSchema.getMinLength(); codegenParameter.pattern = toRegularExpression(parameterSchema.getPattern());
property.maxLength = p.getMaxLength(); property.minLength = p.getMinLength(); property.pattern = toRegularExpression(p.getPattern());
.maximum(subtypeModel.getMaximum()) .maxItems(subtypeModel.getMaxItems()) .maxLength(subtypeModel.getMaxLength()) .maxProperties(subtypeModel.getMaxProperties()) .minimum(subtypeModel.getMinimum())
StringSchema stringSchema = new StringSchema(); stringSchema.setMinLength(queryParameter.getSchema().getMinLength()); stringSchema.setMaxLength(queryParameter.getSchema().getMaxLength()); stringSchema.setPattern(queryParameter.getSchema().getPattern()); stringSchema.setEnum(queryParameter.getSchema().getEnum());
composedSchema.setMaximum(schema.getMaximum()); composedSchema.setMaxItems(schema.getMaxItems()); composedSchema.setMaxLength(schema.getMaxLength()); composedSchema.setMaxProperties(schema.getMaxProperties()); composedSchema.setMinimum(schema.getMinimum());