Class ExampleReader
- java.lang.Object
-
- io.smallrye.openapi.runtime.io.example.ExampleReader
-
public class ExampleReader extends Object
Reading the Example annotation- Author:
- Phillip Kruger ([email protected]), Eric Wittmann ([email protected])
- See Also:
- exampleObject
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.static Map<String,org.eclipse.microprofile.openapi.models.examples.Example>
readExamples(com.fasterxml.jackson.databind.JsonNode node)
Reads theExample
OpenAPI nodes.static Map<String,org.eclipse.microprofile.openapi.models.examples.Example>
readExamples(AnnotationScannerContext context, org.jboss.jandex.AnnotationValue annotationValue)
Reads a map of Example annotations.
-
-
-
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 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 theExample
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 contextvalue
- the value to decode- Returns:
- a Java representation of the 'value' property, either a String or parsed value
-
-