use of io.swagger.models.apideclaration.Parameter in project swagger-parser by swagger-api.
the class ApiDeclarationParser method readParameter.
Parameter readParameter(Map<String, Object> o, MessageBuilder messages) {
Parameter param = new Parameter();
String name = readString(o.get("name"));
if (name != null) {
param.setName(name);
} else {
messages.append(new Message("ApiDeclaration.apis.operations.parameters.name", "missing name", Severity.ERROR));
}
String description = readString(o.get("description"));
param.setDescription(description);
Boolean required = readBoolean(o.get("required"));
param.setRequired(required);
String type = readString(o.get("type"));
param.setType(type);
Boolean allowMultiple = readBoolean(o.get("allowMultiple"));
param.setAllowMultiple(allowMultiple);
return param;
}