Interface ApiContext
-
- All Known Implementing Classes:
OpenApiContext
public interface ApiContext
The 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 void
addMappedExceptionResponse(String exceptionType, org.eclipse.microprofile.openapi.models.responses.APIResponse exceptionResponse)
AnnotationInfo
getAnnotationInfo(org.glassfish.hk2.classmodel.reflect.ExtensibleType<? extends org.glassfish.hk2.classmodel.reflect.ExtensibleType> type)
org.eclipse.microprofile.openapi.models.OpenAPI
getApi()
The currentOpenAPI
object being operated on.ClassLoader
getApplicationClassLoader()
Map<String,org.eclipse.microprofile.openapi.models.responses.APIResponse>
getMappedExceptionResponses()
String
getPath()
The path of the object currently being visited.org.glassfish.hk2.classmodel.reflect.Type
getType(String type)
org.eclipse.microprofile.openapi.models.Operation
getWorkingOperation()
The created operation currently being worked on.boolean
isAllowedType(org.glassfish.hk2.classmodel.reflect.Type type)
boolean
isApplicationType(String type)
-
-
-
Method Detail
-
getApi
org.eclipse.microprofile.openapi.models.OpenAPI getApi()
The currentOpenAPI
object 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
-
-