Class OpenApiAnnotationScanner


  • public class OpenApiAnnotationScanner
    extends Object
    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:
    [email protected]
    • Constructor Detail

      • OpenApiAnnotationScanner

        public OpenApiAnnotationScanner​(OpenApiConfig config,
                                        org.jboss.jandex.IndexView index)
        Constructor.
        Parameters:
        config - OpenApiConfig instance
        index - IndexView of deployment
      • OpenApiAnnotationScanner

        public OpenApiAnnotationScanner​(OpenApiConfig config,
                                        org.jboss.jandex.IndexView index,
                                        List<AnnotationScannerExtension> extensions)
        Constructor.
        Parameters:
        config - OpenApiConfig instance
        index - IndexView of deployment
        extensions - A set of extensions to scanning
      • OpenApiAnnotationScanner

        public OpenApiAnnotationScanner​(OpenApiConfig config,
                                        ClassLoader loader,
                                        org.jboss.jandex.IndexView index)
        Constructor.
        Parameters:
        config - OpenApiConfig instance
        index - IndexView of deployment
      • OpenApiAnnotationScanner

        public OpenApiAnnotationScanner​(OpenApiConfig config,
                                        ClassLoader loader,
                                        org.jboss.jandex.IndexView index,
                                        List<AnnotationScannerExtension> extensions)
        Constructor.
        Parameters:
        config - OpenApiConfig instance
        index - IndexView of deployment
        extensions - A set of extensions to scanning
    • Method Detail

      • scan

        public org.eclipse.microprofile.openapi.models.OpenAPI scan​(String... filter)
        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