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:
  • Method Details

    • 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 an APIResponses model.
      Parameters:
      context - the scanning context
      annotationValue - @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 a APIResponses 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 context
      annotationValue - 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 the APIResponse 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 context
      annotationInstance - @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 context
      annotation - @APIResponseSchema annotation
      Returns:
      APIResponse model
    • getResponseAnnotations

      public static List<org.jboss.jandex.AnnotationInstance> getResponseAnnotations(AnnotationScannerContext context, 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)