.format(subtypeModel.getFormat()) .maximum(subtypeModel.getMaximum()) .maxItems(subtypeModel.getMaxItems()) .maxLength(subtypeModel.getMaxLength()) .maxProperties(subtypeModel.getMaxProperties())
public static boolean isArraySchema(Schema schema) { if (schema instanceof ArraySchema) { return true; } // assume it's an array if maxItems, minItems is set if (schema.getMaxItems() != null || schema.getMinItems() != null) { return true; } return false; }
private ValidationReport validateMaxItems(final Collection<String> values, final Parameter parameter) { if (parameter.getSchema().getMaxItems() != null && values.size() > parameter.getSchema().getMaxItems()) { return ValidationReport.singleton(messages.get("validation.request.parameter.collection.tooManyItems", parameter.getName(), parameter.getSchema().getMaxItems(), values.size()) ); } return ValidationReport.empty(); }
Integer maxItems = schema.getMaxItems(); if(minItems != null) sb.append(", ").append(minItems); if(minItems != null && maxItems != null) sb.append(", ").append(maxItems);
codegenProperty.maxItems = propertySchema.getMaxItems(); codegenProperty.minItems = propertySchema.getMinItems(); String itemName = null;
codegenProperty.maxItems = propertySchema.getMaxItems(); codegenProperty.minItems = propertySchema.getMinItems(); String itemName = null;
codegenParameter.minLength = propertySchema.getMinLength(); codegenParameter.pattern = toRegularExpression(propertySchema.getPattern()); codegenParameter.maxItems = propertySchema.getMaxItems(); codegenParameter.minItems = propertySchema.getMinItems(); codegenParameter.uniqueItems = propertySchema.getUniqueItems() == null ? false : propertySchema.getUniqueItems();
codegenParameter.minLength = parameterSchema.getMinLength(); codegenParameter.pattern = toRegularExpression(parameterSchema.getPattern()); codegenParameter.maxItems = parameterSchema.getMaxItems(); codegenParameter.minItems = parameterSchema.getMinItems(); codegenParameter.uniqueItems = parameterSchema.getUniqueItems() == null ? false : parameterSchema.getUniqueItems();
codegenParameter.minLength = parameterSchema.getMinLength(); codegenParameter.pattern = toRegularExpression(parameterSchema.getPattern()); codegenParameter.maxItems = parameterSchema.getMaxItems(); codegenParameter.minItems = parameterSchema.getMinItems(); codegenParameter.uniqueItems = parameterSchema.getUniqueItems() == null ? false : parameterSchema.getUniqueItems();
codegenParameter.minLength = parameterSchema.getMinLength(); codegenParameter.pattern = toRegularExpression(parameterSchema.getPattern()); codegenParameter.maxItems = parameterSchema.getMaxItems(); codegenParameter.minItems = parameterSchema.getMinItems(); codegenParameter.uniqueItems = parameterSchema.getUniqueItems() == null ? false : parameterSchema.getUniqueItems();
property.maxItems = p.getMaxItems(); property.minItems = p.getMinItems(); String itemName = null;
.format(subtypeModel.getFormat()) .maximum(subtypeModel.getMaximum()) .maxItems(subtypeModel.getMaxItems()) .maxLength(subtypeModel.getMaxLength()) .maxProperties(subtypeModel.getMaxProperties())
ArraySchema arraySchema = new ArraySchema(); arraySchema.setMinItems(queryParameter.getSchema().getMinItems()); arraySchema.setMaxItems(queryParameter.getSchema().getMaxItems()); arraySchema.setItems(inner); String collectionFormat = getCollectionFormat(queryParameter);
composedSchema.setFormat(schema.getFormat()); composedSchema.setMaximum(schema.getMaximum()); composedSchema.setMaxItems(schema.getMaxItems()); composedSchema.setMaxLength(schema.getMaxLength()); composedSchema.setMaxProperties(schema.getMaxProperties());