fabiomaffioletti / jsondoc

Easily generate docs and playground for your RESTful API
http://jsondoc.org
MIT License
264 stars 127 forks source link

@ApiResponseObject generates "wildcard" in the docs #182

Open selivonchik opened 8 years ago

selivonchik commented 8 years ago

GIVEN

THEN

P.S.: Downgrade to JSONdoc 1.2.4 helped to fix Objects list - classes annotated with @ApiObject are shown there, but Response object is still "wildcard"

selivonchik commented 8 years ago

There were some more details found. We have a method declared as follows: @ApiMethod(description = "Sign up by login and password") @ApiResponseObject(clazz = JsonCallResult.class) @ApiErrors(apierrors = ...) @RequestMapping(value = SIGN_UP_URL, method = RequestMethod.POST) public ResponseEntity<?> signUp(...) { // do sign up return new ResponseEntity(JsonCallResult.ok(), HttpStatus.OK); }

When response type is ResponseEntity<?> error happens regardless @ApiResponseObject annotation, but when I changed response type to ResponseEntity everything worked fine - Response object in the doc page was correctly displayed and Objects section also had JsonCallResult description

platinump2w commented 7 years ago

+1