1

we are using swagger for documentation. We have mentioned @ApiModel on Pojo, problem here is if you have any wrapper classes like Integer, BigDecimal etc it is documenting those classes as well.

Here is the Pojo,

@XmlRootElement

@ApiModel
public class AccountSeriesUpdateRequest implements Serializable{

private static final long serialVersionUID = 1L;

private List<String> acclist;

private BigDecimal trans;

public List<String> getAcclist() {
    return acclist;
}

public void setAcclist(List<String> acclist) {
    this.acclist = acclist;
}

public BigDecimal getTrans() {
    return trans;
}

public void setTrans(BigDecimal trans) {
    this.trans = trans;
}`

And here is the swagger documentation for above model,

AccountSeriesUpdateRequest {
trans(BigDecimal, optional): description,

accountSeriesRecord (AccountSeriesPersistentRecord, optional): Account Series Persistent Record,

acclist (array[string], optional)
}

BigDecimal {
scale (integer, optional),
precision (integer, optional)
}

Please suggest me a way to get rid of from unwanted object in swagger documentation.

Sunil Rk
  • 999
  • 6
  • 12
  • 35
  • Which swagger library do you use and which version of it? – Ron Apr 06 '15 at 11:49
  • i am using below dependencies, com.wordnik swagger-annotations_2.10 1.3.0 com.wordnik swagger-jaxrs_2.10 1.3.0 com.mangofactory swagger-springmvc 0.9.3 – Sunil Rk May 22 '15 at 06:36
  • Check out https://github.com/springfox/springfox instead. – Ron May 22 '15 at 16:48

0 Answers0