java - What could i put in response in @ApiOperation of Swagger -
in code use status.class @apioperation when method return response.nocontent.build();?
@delete @path("/property/{id}") @apioperation(value = "delete", notes = "delete persisted property data source.", response = status.class??) public response delete(string id){ ... ... return response.nocontent().build(); }
you can omit response part , use void.class default. docs:
public abstract class<?> responsethe response type of operation. in jax-rs applications, the return type of method automatically used, unless
javax.ws.rs.core.response. in case, operation return type defaultvoidactual response type cannot known. (emphasis mine)setting property override automatically-derived data type.
if value used class representing primitive (
integer,long, ...) corresponding primitive type used.default:
java.lang.void.class
Comments
Post a Comment