Swagger Operations
@RestOp-annotated methods automatically get rendered as Swagger operations.
The following shows the annotations defined on the GET /pet
operation:
PetStoreResource.getPets()
@RestGet(
path="/pet",
summary="All pets in the store",
swagger=@OpSwagger(
tags="pet",
...
),
...
)
public Collection getPets() throws NotAcceptable {
return store.getPets();
}
Methods marked as deprecated will show up as deprecated in the Swagger UI: s
PetStoreResource.findPetsByTag()
@RestGet(
path="/pet/findByTags",
summary="Finds Pets by tags",
...
)
@Deprecated
public Collection findPetsByTags(...) {
...
}