Class ResponseReader
- java.lang.Object
-
- io.smallrye.openapi.runtime.io.response.ResponseReader
-
public class ResponseReader extends Object
Reading the APIResponse annotation- Author:
- Phillip Kruger ([email protected]), Eric Wittmann ([email protected])
- See Also:
- responseObject
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.jboss.jandex.AnnotationInstance
getResponseAnnotation(org.jboss.jandex.MethodInfo method)
static List<org.jboss.jandex.AnnotationInstance>
getResponseAnnotations(org.jboss.jandex.AnnotationTarget target)
static String
getResponseName(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance annotation)
static org.jboss.jandex.AnnotationInstance
getResponsesAnnotation(org.jboss.jandex.MethodInfo method)
static org.jboss.jandex.AnnotationInstance
getResponseSchemaAnnotation(org.jboss.jandex.MethodInfo method)
static boolean
hasResponseCodeValue(org.jboss.jandex.MethodInfo method)
static org.eclipse.microprofile.openapi.models.responses.APIResponse
readResponse(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance annotationInstance)
Reads a APIResponse annotation into a model.static org.eclipse.microprofile.openapi.models.responses.APIResponses
readResponses(com.fasterxml.jackson.databind.JsonNode node)
Reads aAPIResponses
OpenAPI node.static org.eclipse.microprofile.openapi.models.responses.APIResponses
readResponses(AnnotationScannerContext context, org.jboss.jandex.AnnotationValue annotationValue)
Reads an array of APIResponse annotations into anAPIResponses
model.static org.eclipse.microprofile.openapi.models.responses.APIResponse
readResponseSchema(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance annotation)
Reads a APIResponseSchema annotation into a model.static Map<String,org.eclipse.microprofile.openapi.models.responses.APIResponse>
readResponsesMap(com.fasterxml.jackson.databind.JsonNode node)
Reads theAPIResponse
OpenAPI nodes.static Map<String,org.eclipse.microprofile.openapi.models.responses.APIResponse>
readResponsesMap(AnnotationScannerContext context, org.jboss.jandex.AnnotationValue annotationValue)
Reads a map of APIResponse annotations.
-
-
-
Method Detail
-
readResponses
public static org.eclipse.microprofile.openapi.models.responses.APIResponses readResponses(AnnotationScannerContext context, org.jboss.jandex.AnnotationValue annotationValue)
Reads an array of APIResponse annotations into anAPIResponses
model.- Parameters:
context
- the scanning contextannotationValue
- @APIResponse annotation- Returns:
- APIResponses model
-
readResponses
public static org.eclipse.microprofile.openapi.models.responses.APIResponses readResponses(com.fasterxml.jackson.databind.JsonNode node)
Reads aAPIResponses
OpenAPI node.- Parameters:
node
- json object- Returns:
- APIResponses model
-
readResponsesMap
public static Map<String,org.eclipse.microprofile.openapi.models.responses.APIResponse> readResponsesMap(AnnotationScannerContext context, org.jboss.jandex.AnnotationValue annotationValue)
Reads a map of APIResponse annotations.- Parameters:
context
- the scanning contextannotationValue
- map of @APIResponse annotations- Returns:
- Map of APIResponse models
-
readResponsesMap
public static Map<String,org.eclipse.microprofile.openapi.models.responses.APIResponse> readResponsesMap(com.fasterxml.jackson.databind.JsonNode node)
Reads theAPIResponse
OpenAPI nodes.- Parameters:
node
- map of json objects- Returns:
- Map of APIResponse models
-
readResponse
public static org.eclipse.microprofile.openapi.models.responses.APIResponse readResponse(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance annotationInstance)
Reads a APIResponse annotation into a model.- Parameters:
context
- the scanning contextannotationInstance
- @APIResponse annotation- Returns:
- APIResponse model
-
readResponseSchema
public static org.eclipse.microprofile.openapi.models.responses.APIResponse readResponseSchema(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance annotation)
Reads a APIResponseSchema annotation into a model.- Parameters:
context
- the scanning contextannotation
- @APIResponseSchema annotation- Returns:
- APIResponse model
-
getResponseAnnotations
public static List<org.jboss.jandex.AnnotationInstance> getResponseAnnotations(org.jboss.jandex.AnnotationTarget target)
-
hasResponseCodeValue
public static boolean hasResponseCodeValue(org.jboss.jandex.MethodInfo method)
-
getResponseAnnotation
public static org.jboss.jandex.AnnotationInstance getResponseAnnotation(org.jboss.jandex.MethodInfo method)
-
getResponsesAnnotation
public static org.jboss.jandex.AnnotationInstance getResponsesAnnotation(org.jboss.jandex.MethodInfo method)
-
getResponseSchemaAnnotation
public static org.jboss.jandex.AnnotationInstance getResponseSchemaAnnotation(org.jboss.jandex.MethodInfo method)
-
getResponseName
public static String getResponseName(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance annotation)
-
-