@JsonCreator
public SchemaField(@ApiParam("name") String name,
@ApiParam("type") FieldType type,
@ApiParam(value = "descriptiveName", required = false) String descriptiveName,
@ApiParam(value = "description", required = false) String description,
@ApiParam(value = "category", required = false) String category) {
this.name = ValidationUtil.checkNotNull(name, "name");
this.type = ValidationUtil.checkNotNull(type, "type");
this.descriptiveName = descriptiveName;
this.description = description;
this.category = category;
if (this.name.isEmpty()) {
throw new RakamException(String.format("Field name (%s) can't be empty string", this.name),
HttpResponseStatus.BAD_REQUEST);
}
}