teamcarma / swagger-jaxrs-doclet

This fork is no longer actively maintained, please switch to https://github.com/conorroche/swagger-doclet
Apache License 2.0
81 stars 38 forks source link

Documentation of java.lang.BigDecimal does not match serialization #88

Closed ghost closed 9 years ago

ghost commented 9 years ago

This is a suggested fix for https://github.com/teamcarma/swagger-jaxrs-doclet/issues/87.

First time I'm creating a PR so please bear with me if I make mistakes.

joepadmiraal commented 9 years ago

I think the new if clause you added in ParserHelper.java has some dead code. javaType.toLowerCase().equals("double") is already checked in the original double if clause. If javaType equals double your code will never be executed due to the return statement in the original double if clause.

conorroche commented 9 years ago

just saw this now, ive already fixed this separately so will close off but thanks a lot for contributing, my fix also supports bigint and @responseType e.g.

/* * @responseType java.math.BigDecimal / @SuppressWarnings("javadoc") @GET public Response responseBigDecObject() { return Response.ok().build(); }