Interface AnnotationScannerExtension
-
- All Known Implementing Classes:
AnnotationScannerExtension.Default
public interface AnnotationScannerExtensionExtension point for supporting extensions to OpenAPI Scanners. Implement this directly
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAnnotationScannerExtension.Default
-
Field Summary
Fields Modifier and Type Field Description static List<AnnotationScannerExtension>DEFAULT
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default booleanisScannerAnnotationExtension(org.jboss.jandex.AnnotationInstance instance)Returns true if the given annotation is a scanner annotation extension, such as would be in the scanner's package.default ObjectparseExtension(String key, String value)Parses an OpenAPI Extension value.default org.eclipse.microprofile.openapi.models.media.SchemaparseSchema(String jsonSchema)Parse a string value as a Schemadefault ObjectparseValue(String value)Parse a string value as an Object.default voidprocessScannerApplications(AnnotationScanner scanner, Collection<org.jboss.jandex.ClassInfo> applications)Gives a chance to extensions to process the set of scanner application classes.default org.jboss.jandex.TyperesolveAsyncType(org.jboss.jandex.Type type)Unwraps an asynchronous type such asCompletionStage<X>into its resolved typeX
-
-
-
Field Detail
-
DEFAULT
static final List<AnnotationScannerExtension> DEFAULT
-
-
Method Detail
-
resolveAsyncType
default org.jboss.jandex.Type resolveAsyncType(org.jboss.jandex.Type type)
Unwraps an asynchronous type such asCompletionStage<X>into its resolved typeX- Parameters:
type- the type to unwrap if it is a supported async type- Returns:
- the resolved type or null if not supported
-
processScannerApplications
default void processScannerApplications(AnnotationScanner scanner, Collection<org.jboss.jandex.ClassInfo> applications)
Gives a chance to extensions to process the set of scanner application classes.- Parameters:
scanner- the scanner used for application scanningapplications- the set of rest application classes
-
isScannerAnnotationExtension
default boolean isScannerAnnotationExtension(org.jboss.jandex.AnnotationInstance instance)
Returns true if the given annotation is a scanner annotation extension, such as would be in the scanner's package.- Parameters:
instance- the annotation to check- Returns:
- true if the given annotation is a jax-rs annotation extension
-
parseExtension
default Object parseExtension(String key, String value)
Parses an OpenAPI Extension value. The value may be: - JSON object - starts with '{' - JSON array - starts with '[' - number - boolean - string- Parameters:
key- the name of the extension propertyvalue- the string value of the extension- Returns:
- the extension
-
parseValue
default Object parseValue(String value)
Parse a string value as an Object. By default, try to parse the value from JSON The value may be: - JSON object - starts with '{' - JSON array - starts with '[' - number - boolean - string- Parameters:
value- the string value- Returns:
- the parsed value as Object
-
parseSchema
default org.eclipse.microprofile.openapi.models.media.Schema parseSchema(String jsonSchema)
Parse a string value as a Schema- Parameters:
jsonSchema- the string value of the schema, in JSON format- Returns:
- the parsed value as Schema
-
-