Class ExampleReader
java.lang.Object
io.smallrye.openapi.runtime.io.example.ExampleReader
Reading the Example annotation
- Author:
- Phillip Kruger (phillip.kruger@redhat.com), Eric Wittmann (eric.wittmann@gmail.com)
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectparseValue(AnnotationScannerContext context, String value) Reads an example value and decode it, the parsing is delegated to the extensions currently set in the scanner.readExamples(com.fasterxml.jackson.databind.JsonNode node) Reads theExampleOpenAPI nodes.readExamples(AnnotationScannerContext context, org.jboss.jandex.AnnotationValue annotationValue) Reads a map of Example annotations.
-
Method Details
-
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 contextannotationValue- 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 theExampleOpenAPI nodes.- Parameters:
node- map of json nodes- Returns:
- Map of Example model
-
parseValue
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 contextvalue- the value to decode- Returns:
- a Java representation of the 'value' property, either a String or parsed value
-