Annotation Interface ApiDocResponse
Handler return types are inferred automatically. Use this annotation for additional status codes, error responses, response descriptions that cannot be derived from the method signature, or a composed independent-model graph whose runtime representation is an untyped JSON tree.
- See Also:
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionOptional response content type.Response description.Class<?> Optional root model of a composed independent-model graph response.String[]Optional relationship paths to include in the documented model graph.Optional reusable response reference.Class<?> Optional response body type.
-
Element Details
-
status
int statusHTTP status code. -
description
-
ref
String refOptional reusable response reference.A bare value such as
erroris resolved to#/components/responses/error. A value starting with#/is used as-is. When set,description(),type(),modelGraph(),modelGraphPaths(), andcontentType()are ignored because OpenAPI Reference Objects cannot have response-object siblings in OpenAPI 3.0.- Default:
""
-
type
Class<?> typeOptional response body type.Void.classmeans no explicit type was provided.- Default:
java.lang.Void.class
-
modelGraph
Class<?> modelGraphOptional root model of a composed independent-model graph response.Use this when a handler returns a
JsonNode(or another untyped JSON representation) produced from a model graph. The generated schema starts with this model and follows child relationships that declare both aParent.pathInParentand optional relationship documentation throughParent.apiDoc. This option is mutually exclusive withtype(). When the handler returns an array or collection, the response remains an array whose items are graphs rooted at this model.- Default:
java.lang.Void.class
-
modelGraphPaths
String[] modelGraphPathsOptional relationship paths to include in the documented model graph.Paths are relative to
modelGraph()and use the slash-separated values declared byParent.pathInParent. Ancestors of a selected path are included automatically, so selectinglocations/connections/metersincludes thelocationsandconnectionsrelationships as well. An empty array preserves the default of including every documented relationship below the root model.- Default:
{}
-
contentType
-