Package io.smallrye.openapi.runtime
Class OpenApiProcessor
- java.lang.Object
-
- io.smallrye.openapi.runtime.OpenApiProcessor
-
public class OpenApiProcessor extends Object
Provides some core archive processing functionality.- Author:
- [email protected]
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.eclipse.microprofile.openapi.models.OpenAPI
bootstrap(OpenApiConfig config, org.jboss.jandex.IndexView index)
static org.eclipse.microprofile.openapi.models.OpenAPI
bootstrap(OpenApiConfig config, org.jboss.jandex.IndexView index, OpenApiStaticFile... staticFiles)
static org.eclipse.microprofile.openapi.models.OpenAPI
bootstrap(OpenApiConfig config, org.jboss.jandex.IndexView index, ClassLoader classLoader)
static org.eclipse.microprofile.openapi.models.OpenAPI
bootstrap(OpenApiConfig config, org.jboss.jandex.IndexView index, ClassLoader classLoader, OpenApiStaticFile... staticFiles)
static org.eclipse.microprofile.openapi.models.OpenAPI
bootstrap(org.jboss.jandex.IndexView index)
static org.eclipse.microprofile.openapi.OASFilter
getFilter(OpenApiConfig config, ClassLoader loader)
Instantiate theOASFilter
configured by the app.static org.eclipse.microprofile.openapi.models.OpenAPI
modelFromAnnotations(OpenApiConfig config, ClassLoader loader, org.jboss.jandex.IndexView index)
Create anOpenAPI
model by scanning the deployment for relevant JAX-RS and OpenAPI annotations.static org.eclipse.microprofile.openapi.models.OpenAPI
modelFromAnnotations(OpenApiConfig config, org.jboss.jandex.IndexView index)
Create anOpenAPI
model by scanning the deployment for relevant JAX-RS and OpenAPI annotations.static org.eclipse.microprofile.openapi.models.OpenAPI
modelFromReader(OpenApiConfig config, ClassLoader loader)
Instantiate the configuredOASModelReader
and invoke it.static org.eclipse.microprofile.openapi.models.OpenAPI
modelFromStaticFile(OpenApiStaticFile staticFile)
Parse the static file content and return the resulting model.
-
-
-
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 anOpenAPI
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
- OpenApiConfigindex
- 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 anOpenAPI
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
- OpenApiConfigloader
- ClassLoaderindex
- IndexView of Archive- Returns:
- OpenAPIImpl generated from annotations
-
modelFromReader
public static org.eclipse.microprofile.openapi.models.OpenAPI modelFromReader(OpenApiConfig config, ClassLoader loader)
Instantiate the configuredOASModelReader
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, aOpenApiRuntimeException
is thrown.- Parameters:
config
- OpenApiConfigloader
- ClassLoader- Returns:
- OpenApiImpl created from OASModelReader
-
getFilter
public static org.eclipse.microprofile.openapi.OASFilter getFilter(OpenApiConfig config, ClassLoader loader)
Instantiate theOASFilter
configured by the app.- Parameters:
config
- OpenApiConfigloader
- ClassLoader- Returns:
- OASFilter instance retrieved from loader
-
-