-
Notifications
You must be signed in to change notification settings - Fork 200
Enunciate Specific Annotations
Ryan Heaton edited this page Nov 4, 2015
·
31 revisions
Note: The following applies to Enunciate version 2. For information about enunciate-specific annotations in Enunciate 1.x, see Enunciate Specific Annotations (Version 1)
This document serves as a reference for the set of Enunciate-specific annotations that can be used to enhance the documentation for your Web service API.
All annotations are contained within the com.webcohesion.enunciate.metadata
package, which has been abbreviated to c.w.e.m
below for readability purposes.
Annotation | Description |
---|---|
c.w.e.m.rs.StatusCodes |
Applied to a resource class or a resource method. Used to document the set of status codes that may be responses to the operation. The status codes annotated on a method are appended to the status codes annotated on the defining resource class. |
c.w.e.m.rs.StatusCodes |
Applied to a resource class or a resource method. Used to document the set of status codes that may be responses to the operation. The status codes annotated on a method are appended to the status codes annotated on the defining resource class. |
c.w.e.m.rs.Warnings |
Applied to a resource class or a resource method. Used to document the set of warning headers that may be included upon invocation of the operation. The warnings annotated on a method are appended to the warnings annotated on the defining resource class. |
c.w.e.m.rs.TypeHint |
Applied to a resource method. Some JAX-RS methods may return javax.ws.rs.core.Response and so Enunciate can't tell what kind of a response is expected in the response body. The TypeHint annotation is used to give Enunciate a hint about what is to be returned. |
c.w.e.m.rs.ResponseHeaders |
Applied to a resource class or a resource method. Used to document the set of response headers that may be included upon invocation of the operation. The response headers annotated on a method are appended to the warnings annotated on the defining resource class. |
Annotation | Description |
---|---|
c.w.e.m.Label |
Applied to a resource class, a data type, a web fault or a web service. Used to customize the label that is used for the element in the generated documentation. |
c.w.e.m.DocumentationExample |
Applied to a data type accessor (field or property). Used to suggest an example value for XML/JSON examples. |
c.w.e.m.rs.ResourceGroup |
Applied to a resource class or a resource method. Used to customize how resources are grouped in the documentation. See Module-JAXRS. |
c.w.e.m.rs.ResourceLabel |
Applied to a resource class or a resource method. Used to customize how resources or resource methods are labeled in the generated documentation. |
Annotation | Description |
---|---|
c.w.e.m.Ignore |
Applied to a Java class. Used to suggest to Enunciate that the annotated class should be ignored, if possible. The class may not be able to be ignored if it's explicitly referenced from a service, resource, or data type that is not excluded. |