Class OpenApiProcessor


  • public class OpenApiProcessor
    extends Object
    Provides some core archive processing functionality.
    Author:
    [email protected]
    • Method Detail

      • bootstrap

        public static org.eclipse.microprofile.openapi.models.OpenAPI bootstrap​(org.jboss.jandex.IndexView index)
      • bootstrap

        public static org.eclipse.microprofile.openapi.models.OpenAPI bootstrap​(OpenApiConfig config,
                                                                                org.jboss.jandex.IndexView index)
      • bootstrap

        public static org.eclipse.microprofile.openapi.models.OpenAPI bootstrap​(OpenApiConfig config,
                                                                                org.jboss.jandex.IndexView index,
                                                                                OpenApiStaticFile... staticFiles)
      • bootstrap

        public static org.eclipse.microprofile.openapi.models.OpenAPI bootstrap​(OpenApiConfig config,
                                                                                org.jboss.jandex.IndexView index,
                                                                                ClassLoader classLoader)
      • bootstrap

        public static org.eclipse.microprofile.openapi.models.OpenAPI bootstrap​(OpenApiConfig config,
                                                                                org.jboss.jandex.IndexView index,
                                                                                ClassLoader classLoader,
                                                                                OpenApiStaticFile... staticFiles)
      • modelFromStaticFile

        public static org.eclipse.microprofile.openapi.models.OpenAPI modelFromStaticFile​(OpenApiStaticFile staticFile)
        Parse the static file content and return the resulting model. Note that this method does NOT close the resources in the static file. The caller is responsible for that.
        Parameters:
        staticFile - OpenApiStaticFile to be parsed
        Returns:
        OpenApiImpl
      • modelFromAnnotations

        public static org.eclipse.microprofile.openapi.models.OpenAPI modelFromAnnotations​(OpenApiConfig config,
                                                                                           org.jboss.jandex.IndexView index)
        Create an OpenAPI model by scanning the deployment for relevant JAX-RS and OpenAPI annotations. If scanning is disabled, this method returns null. If scanning is enabled but no relevant annotations are found, an empty OpenAPI model is returned.
        Parameters:
        config - OpenApiConfig
        index - IndexView of Archive
        Returns:
        OpenAPIImpl generated from annotations
      • modelFromAnnotations

        public static org.eclipse.microprofile.openapi.models.OpenAPI modelFromAnnotations​(OpenApiConfig config,
                                                                                           ClassLoader loader,
                                                                                           org.jboss.jandex.IndexView index)
        Create an OpenAPI model by scanning the deployment for relevant JAX-RS and OpenAPI annotations. If scanning is disabled, this method returns null. If scanning is enabled but no relevant annotations are found, an empty OpenAPI model is returned.
        Parameters:
        config - OpenApiConfig
        loader - ClassLoader
        index - IndexView of Archive
        Returns:
        OpenAPIImpl generated from annotations
      • modelFromReader

        public static org.eclipse.microprofile.openapi.models.OpenAPI modelFromReader​(OpenApiConfig config,
                                                                                      ClassLoader loader)
        Instantiate the configured OASModelReader and invoke it. If no reader is configured, then return null. If a class is configured but there is an error either instantiating or invoking it, a OpenApiRuntimeException is thrown.
        Parameters:
        config - OpenApiConfig
        loader - ClassLoader
        Returns:
        OpenApiImpl created from OASModelReader
      • getFilter

        public static org.eclipse.microprofile.openapi.OASFilter getFilter​(OpenApiConfig config,
                                                                           ClassLoader loader)
        Instantiate the OASFilter configured by the app.
        Parameters:
        config - OpenApiConfig
        loader - ClassLoader
        Returns:
        OASFilter instance retrieved from loader