Class OpenApiContext
- java.lang.Object
-
- fish.payara.microprofile.openapi.impl.visitor.OpenApiContext
-
- All Implemented Interfaces:
ApiContext
public class OpenApiContext extends Object implements ApiContext
-
-
Constructor Summary
Constructors Constructor Description OpenApiContext(OpenApiContext parentApiContext, org.glassfish.hk2.classmodel.reflect.AnnotatedElement annotatedElement)
OpenApiContext(org.glassfish.hk2.classmodel.reflect.Types allTypes, Set<org.glassfish.hk2.classmodel.reflect.Type> allowedTypes, ClassLoader appClassLoader, org.eclipse.microprofile.openapi.models.OpenAPI api)
-
Method Summary
All Methods Instance Methods Concrete 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)
-
-
-
Constructor Detail
-
OpenApiContext
public OpenApiContext(org.glassfish.hk2.classmodel.reflect.Types allTypes, Set<org.glassfish.hk2.classmodel.reflect.Type> allowedTypes, ClassLoader appClassLoader, org.eclipse.microprofile.openapi.models.OpenAPI api)
-
OpenApiContext
public OpenApiContext(OpenApiContext parentApiContext, org.glassfish.hk2.classmodel.reflect.AnnotatedElement annotatedElement)
-
-
Method Detail
-
getApi
public org.eclipse.microprofile.openapi.models.OpenAPI getApi()
Description copied from interface:ApiContext
The currentOpenAPI
object being operated on.- Specified by:
getApi
in interfaceApiContext
-
getPath
public String getPath()
Description copied from interface:ApiContext
The path of the object currently being visited. If the path is null, the object has no context (e.g a POJO).- Specified by:
getPath
in interfaceApiContext
-
getWorkingOperation
public org.eclipse.microprofile.openapi.models.Operation getWorkingOperation()
Description copied from interface:ApiContext
The created operation currently being worked on.- Specified by:
getWorkingOperation
in interfaceApiContext
-
addMappedExceptionResponse
public void addMappedExceptionResponse(String exceptionType, org.eclipse.microprofile.openapi.models.responses.APIResponse exceptionResponse)
- Specified by:
addMappedExceptionResponse
in interfaceApiContext
-
getMappedExceptionResponses
public Map<String,org.eclipse.microprofile.openapi.models.responses.APIResponse> getMappedExceptionResponses()
- Specified by:
getMappedExceptionResponses
in interfaceApiContext
-
isAllowedType
public boolean isAllowedType(org.glassfish.hk2.classmodel.reflect.Type type)
- Specified by:
isAllowedType
in interfaceApiContext
- Parameters:
type
- any class, not null- Returns:
- true, if the give type is a filtered class for OpenAPI metadata processing otherwise false
-
isApplicationType
public boolean isApplicationType(String type)
- Specified by:
isApplicationType
in interfaceApiContext
- Parameters:
type
- any class, not null- Returns:
- true, if the give type is a known type in this context, else false
-
getType
public org.glassfish.hk2.classmodel.reflect.Type getType(String type)
- Specified by:
getType
in interfaceApiContext
- Parameters:
type
- any class, not null- Returns:
- type, if the give type is a known type in this context, else null
-
getApplicationClassLoader
public ClassLoader getApplicationClassLoader()
- Specified by:
getApplicationClassLoader
in interfaceApiContext
- Returns:
- the application class loader
-
getAnnotationInfo
public AnnotationInfo getAnnotationInfo(org.glassfish.hk2.classmodel.reflect.ExtensibleType<? extends org.glassfish.hk2.classmodel.reflect.ExtensibleType> type)
- Specified by:
getAnnotationInfo
in interfaceApiContext
- Returns:
- the aggregated annotation info of type
-
-