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

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -