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<?> response

the 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 default void actual 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

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -