Class ResponseReader
- java.lang.Object
-
- io.smallrye.openapi.runtime.io.response.ResponseReader
-
public class ResponseReader extends Object
Reading the APIResponse annotation- Author:
- Phillip Kruger (phillip.kruger@redhat.com), Eric Wittmann (eric.wittmann@gmail.com)
- See Also:
- responseObject
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<org.jboss.jandex.AnnotationInstance>getResponseAnnotations(org.jboss.jandex.AnnotationTarget target)static StringgetResponseName(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance annotation)static org.jboss.jandex.AnnotationInstancegetResponsesAnnotation(org.jboss.jandex.MethodInfo method)static org.jboss.jandex.AnnotationInstancegetResponseSchemaAnnotation(org.jboss.jandex.MethodInfo method)static booleanhasResponseCodeValue(org.jboss.jandex.AnnotationInstance responseAnnotation)static org.eclipse.microprofile.openapi.models.responses.APIResponsereadResponse(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance annotationInstance)Reads a APIResponse annotation into a model.static org.eclipse.microprofile.openapi.models.responses.APIResponsesreadResponses(com.fasterxml.jackson.databind.JsonNode node)Reads aAPIResponsesOpenAPI node.static org.eclipse.microprofile.openapi.models.responses.APIResponsesreadResponses(AnnotationScannerContext context, org.jboss.jandex.AnnotationValue annotationValue)Reads an array of APIResponse annotations into anAPIResponsesmodel.static org.eclipse.microprofile.openapi.models.responses.APIResponsereadResponseSchema(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance annotation)Reads a APIResponseSchema annotation into a model.static org.eclipse.microprofile.openapi.models.responses.APIResponsesreadResponsesExtensions(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance responsesAnnotation, org.eclipse.microprofile.openapi.models.responses.APIResponses responses)static Map<String,org.eclipse.microprofile.openapi.models.responses.APIResponse>readResponsesMap(com.fasterxml.jackson.databind.JsonNode node)Reads theAPIResponseOpenAPI 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 anAPIResponsesmodel.- Parameters:
context- the scanning contextannotationValue- @APIResponse annotation- Returns:
- APIResponses model
-
readResponsesExtensions
public static org.eclipse.microprofile.openapi.models.responses.APIResponses readResponsesExtensions(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance responsesAnnotation, org.eclipse.microprofile.openapi.models.responses.APIResponses responses)
-
readResponses
public static org.eclipse.microprofile.openapi.models.responses.APIResponses readResponses(com.fasterxml.jackson.databind.JsonNode node)
Reads aAPIResponsesOpenAPI 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 theAPIResponseOpenAPI 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.AnnotationInstance responseAnnotation)
-
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)
-
-