--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
great ! thanks, would you have an example of such an annotation?
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface SwaggerDefaults {
}
-------------------------------------------------
public class SwaggerDef {
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "a", value = "a", required = true, dataType = "string", paramType = "header", defaultValue = "aaaaa"),
@ApiImplicitParam(name = "b", value = "b", required = true, dataType = "string", paramType = "header", defaultValue = "bbbbb"),
})
@ApiResponses(value = {
@ApiResponse(code = 200, message = "The request returned a valid response."),
@ApiResponse(code = 4000, message = "Bad request"),
@ApiResponse(code = 204, message = "No content or data found"),
@ApiResponse(code = 400, message = "Bad request"),
@ApiResponse(code = 500, message = "Internal server error")})
@Inject
@SwaggerDefaults
public void defaults() {
}
}
--------------------------------------------------
@GET
@LogPerformance
@Produces (value = {MediaType.APPLICATION_JSON})
@ApiOperation (value = "aaaa")
----> @SwaggerDefaults
@Path("/index/{aaa}")
public Object myRestEndPoint() throws Throwable {
............
}
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
well.. i'm just thingking. i'm exporting them to json with this plugin, ..
so probably the annotation workaroud won't work..
<groupId>com.github.kongchen</groupId>
<artifactId>swagger-maven-plugin</artifactId>
<swagger-annotations.version>1.3.2</swagger-annotations.version>
<swagger.core.version>1.3.2</swagger.core.version>
<swagger.maven.plugin.version>2.3</swagger.maven.plugin.version>
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
ok, well i can always upgrade the version
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
@SwaggerDefaults(headers = true, responses = true)
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "a", value = "a", required = true, dataType = "string", paramType = "header", defaultValue = "a"),
@ApiImplicitParam(name = "a", value = "a", required = true, dataType = "string", paramType = "header", defaultValue = "a"),
@ApiImplicitParam(name = "a", value = "a", required = true, dataType = "string", paramType = "header", defaultValue = "a"),
})
boolean headers() default false;
@ApiResponses(value = {
@ApiResponse(code = 200, message = "The request returned a valid response."),
@ApiResponse(code = 204, message = "No content or data found"),
@ApiResponse(code = 400, message = "Bad request"),
@ApiResponse(code = 500, message = "Internal server error")})
boolean responses() default false;
}
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.