Interface ApiContext
-
- All Known Implementing Classes:
OpenApiContext
public interface ApiContextThe context in which a class object is being visited. For example, if a method is being visited, the context will contain the current state of theOpenAPI, and the current path in the API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddMappedExceptionResponse(String exceptionType, org.eclipse.microprofile.openapi.models.responses.APIResponse exceptionResponse)AnnotationInfogetAnnotationInfo(org.glassfish.hk2.classmodel.reflect.ExtensibleType<? extends org.glassfish.hk2.classmodel.reflect.ExtensibleType> type)org.eclipse.microprofile.openapi.models.OpenAPIgetApi()The currentOpenAPIobject being operated on.ClassLoadergetApplicationClassLoader()Map<String,org.eclipse.microprofile.openapi.models.responses.APIResponse>getMappedExceptionResponses()StringgetPath()The path of the object currently being visited.org.glassfish.hk2.classmodel.reflect.TypegetType(String type)org.eclipse.microprofile.openapi.models.OperationgetWorkingOperation()The created operation currently being worked on.booleanisAllowedType(org.glassfish.hk2.classmodel.reflect.Type type)booleanisApplicationType(String type)
-
-
-
Method Detail
-
getApi
org.eclipse.microprofile.openapi.models.OpenAPI getApi()
The currentOpenAPIobject being operated on.
-
getPath
String getPath()
The path of the object currently being visited. If the path is null, the object has no context (e.g a POJO).
-
getWorkingOperation
org.eclipse.microprofile.openapi.models.Operation getWorkingOperation()
The created operation currently being worked on.
-
addMappedExceptionResponse
void addMappedExceptionResponse(String exceptionType, org.eclipse.microprofile.openapi.models.responses.APIResponse exceptionResponse)
-
getMappedExceptionResponses
Map<String,org.eclipse.microprofile.openapi.models.responses.APIResponse> getMappedExceptionResponses()
-
isApplicationType
boolean isApplicationType(String type)
- Parameters:
type- any class, not null- Returns:
- true, if the give type is a known type in this context, else false
-
isAllowedType
boolean isAllowedType(org.glassfish.hk2.classmodel.reflect.Type type)
- Parameters:
type- any class, not null- Returns:
- true, if the give type is a filtered class for OpenAPI metadata processing otherwise false
-
getType
org.glassfish.hk2.classmodel.reflect.Type getType(String type)
- Parameters:
type- any class, not null- Returns:
- type, if the give type is a known type in this context, else null
-
getApplicationClassLoader
ClassLoader getApplicationClassLoader()
- Returns:
- the application class loader
-
getAnnotationInfo
AnnotationInfo getAnnotationInfo(org.glassfish.hk2.classmodel.reflect.ExtensibleType<? extends org.glassfish.hk2.classmodel.reflect.ExtensibleType> type)
- Parameters:
type-- Returns:
- the aggregated annotation info of type
-
-