Class ExtensionReader

java.lang.Object
io.smallrye.openapi.runtime.io.extension.ExtensionReader

public class ExtensionReader extends Object
Reading the Extension annotation
Author:
Phillip Kruger (phillip.kruger@redhat.com), Eric Wittmann (eric.wittmann@gmail.com)
See Also:
  • Method Details

    • readExtensions

      public static Map<String,Object> readExtensions(AnnotationScannerContext context, org.jboss.jandex.AnnotationValue annotationValue)
      Reads an array of Extension annotations. The AnnotationValue in this case is an array of Extension annotations. These must be read and converted into a Map.
      Parameters:
      context - the scanning context
      annotationValue - map of @Extension annotations
      Returns:
      Map of Objects
    • readExtensions

      public static Map<String,Object> readExtensions(AnnotationScannerContext context, List<org.jboss.jandex.AnnotationInstance> extensions)
      Reads a List of Extension annotations. These must be read and converted into a Map.
      Parameters:
      context - the scanning context
      extensions - List of @Extension annotations
      Returns:
      Map of Objects
    • readExtensions

      public static Map<String,Object> readExtensions(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance extensible)
    • readExtensionValue

      public static Object readExtensionValue(AnnotationScannerContext context, String name, org.jboss.jandex.AnnotationInstance annotationInstance)
      Reads a single Extension annotation. If the value must be parsed (as indicated by the 'parseValue' attribute of the annotation), the parsing is delegated to the extensions currently set in the scanner. The default value will parse the string using Jackson.
      Parameters:
      context - the scanning context
      name - the name of the extension
      annotationInstance - @Extension annotation
      Returns:
      a Java representation of the 'value' property, either a String or parsed value
    • readExtensions

      public static void readExtensions(com.fasterxml.jackson.databind.JsonNode node, org.eclipse.microprofile.openapi.models.Extensible<?> model)
      Reads model extensions.
      Parameters:
      node - the json object
      model - the model to read to
    • getExtensionsAnnotations

      public static List<org.jboss.jandex.AnnotationInstance> getExtensionsAnnotations(AnnotationScannerContext context, org.jboss.jandex.AnnotationTarget target)
    • getExtensionName

      public static String getExtensionName(AnnotationScannerContext context, org.jboss.jandex.AnnotationInstance annotation)