You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added an errors section to my test class and I got symbol not found for @Apierrors on compile:
@ApiErrors(value = @ApiError(code = 400, reason = "Invalid ID supplied"))
Here's the full class:
packagecom.tyler.testing;
importcom.wordnik.swagger.annotations.*;
importcom.wordnik.swagger.jaxrs.*;
importjavax.ws.rs.*;
@Path("/test.json")
@Api(value = "/test", description = "Test operations")
@Produces({"application/json"})
publicclassTest {
@GET@Path("/{id}")
@ApiOperation(value = "Return a given ID", notes = "Returns an ID when it is less than 10" + "ID > 10 or nonintegers will simulate API error conditions")
@ApiErrors(value = @ApiError(code = 400, reason = "Invalid ID supplied"))
publicStringreturnId (
@ApiParam(value = "ID that you want to be returned to you", allowableValues = "range[1,5]", required = true) @PathParam("id") Stringid)
{
// your resource logic returnid;
}
}
I'm hitting the 1.3.0-RC1 version of Swagger.
The text was updated successfully, but these errors were encountered:
I added an errors section to my test class and I got symbol not found for @Apierrors on compile:
Here's the full class:
I'm hitting the 1.3.0-RC1 version of Swagger.
The text was updated successfully, but these errors were encountered: