Class OpenApiAnnotationScanner
java.lang.Object
io.smallrye.openapi.runtime.scanner.OpenApiAnnotationScanner
Scans a deployment (using the archive and jandex annotation index) for OpenAPI annotations.
Also delegate to all other scanners.
These annotations, if found, are used to generate a valid
OpenAPI model. For reference, see:
https://github.com/eclipse/microprofile-open-api/blob/master/spec/src/main/asciidoc/microprofile-openapi-spec.adoc#annotations
- Author:
- eric.wittmann@gmail.com
-
Constructor Summary
ConstructorsConstructorDescriptionOpenApiAnnotationScanner(OpenApiConfig config, ClassLoader loader, org.jboss.jandex.IndexView index) Constructor.OpenApiAnnotationScanner(OpenApiConfig config, ClassLoader loader, org.jboss.jandex.IndexView index, Supplier<Iterable<AnnotationScanner>> scannerSupplier, List<AnnotationScannerExtension> extensions) Constructor.OpenApiAnnotationScanner(OpenApiConfig config, ClassLoader loader, org.jboss.jandex.IndexView index, List<AnnotationScannerExtension> extensions) Constructor.OpenApiAnnotationScanner(OpenApiConfig config, org.jboss.jandex.IndexView index) Constructor.OpenApiAnnotationScanner(OpenApiConfig config, org.jboss.jandex.IndexView index, List<AnnotationScannerExtension> extensions) Constructor. -
Method Summary
-
Constructor Details
-
OpenApiAnnotationScanner
Constructor.- Parameters:
config- OpenApiConfig instanceindex- IndexView of deployment
-
OpenApiAnnotationScanner
public OpenApiAnnotationScanner(OpenApiConfig config, org.jboss.jandex.IndexView index, List<AnnotationScannerExtension> extensions) Constructor.- Parameters:
config- OpenApiConfig instanceindex- IndexView of deploymentextensions- A set of extensions to scanning
-
OpenApiAnnotationScanner
public OpenApiAnnotationScanner(OpenApiConfig config, ClassLoader loader, org.jboss.jandex.IndexView index) Constructor.- Parameters:
config- OpenApiConfig instanceloader- ClassLoader to discover AnnotationScanner services (via ServiceLoader) as well as loading application classesindex- IndexView of deployment
-
OpenApiAnnotationScanner
public OpenApiAnnotationScanner(OpenApiConfig config, ClassLoader loader, org.jboss.jandex.IndexView index, List<AnnotationScannerExtension> extensions) Constructor.- Parameters:
config- OpenApiConfig instanceloader- ClassLoader to discover AnnotationScanner services (via ServiceLoader) as well as loading application classesindex- IndexView of deploymentextensions- A set of extensions to scanning
-
OpenApiAnnotationScanner
public OpenApiAnnotationScanner(OpenApiConfig config, ClassLoader loader, org.jboss.jandex.IndexView index, Supplier<Iterable<AnnotationScanner>> scannerSupplier, List<AnnotationScannerExtension> extensions) Constructor.- Parameters:
config- OpenApiConfig instanceloader- ClassLoader to load application classesindex- IndexView of deploymentscannerSupplier- supplier of AnnotationScanner instances to use to generate the OpenAPI model for the applicationextensions- A set of extensions to scanning
-
-
Method Details
-
scan
Scan the deployment for relevant annotations. Returns an OpenAPI data model that was built from those found annotations.- Parameters:
filter- Filter to only include certain scanners. Based on the scanner name. (JAX-RS, Spring, Vert.x)- Returns:
- OpenAPI generated from scanning annotations
-