Class ExampleReader


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

      • readExamples

        public static Map<String,​org.eclipse.microprofile.openapi.models.examples.Example> readExamples​(AnnotationScannerContext context,
                                                                                                              org.jboss.jandex.AnnotationValue annotationValue)
        Reads a map of Example annotations.
        Parameters:
        context - the scanning context
        annotationValue - map of @ExampleObject annotations
        Returns:
        Map of Example model
      • readExamples

        public static Map<String,​org.eclipse.microprofile.openapi.models.examples.Example> readExamples​(com.fasterxml.jackson.databind.JsonNode node)
        Reads the Example OpenAPI nodes.
        Parameters:
        node - map of json nodes
        Returns:
        Map of Example model
      • parseValue

        public static Object parseValue​(AnnotationScannerContext context,
                                        String value)
        Reads an example value and decode it, 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
        value - the value to decode
        Returns:
        a Java representation of the 'value' property, either a String or parsed value