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 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)
-
-
-
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:ApiContextThe currentOpenAPIobject being operated on.- Specified by:
getApiin interfaceApiContext
-
getPath
public String getPath()
Description copied from interface:ApiContextThe path of the object currently being visited. If the path is null, the object has no context (e.g a POJO).- Specified by:
getPathin interfaceApiContext
-
getWorkingOperation
public org.eclipse.microprofile.openapi.models.Operation getWorkingOperation()
Description copied from interface:ApiContextThe created operation currently being worked on.- Specified by:
getWorkingOperationin interfaceApiContext
-
addMappedExceptionResponse
public void addMappedExceptionResponse(String exceptionType, org.eclipse.microprofile.openapi.models.responses.APIResponse exceptionResponse)
- Specified by:
addMappedExceptionResponsein interfaceApiContext
-
getMappedExceptionResponses
public Map<String,org.eclipse.microprofile.openapi.models.responses.APIResponse> getMappedExceptionResponses()
- Specified by:
getMappedExceptionResponsesin interfaceApiContext
-
isAllowedType
public boolean isAllowedType(org.glassfish.hk2.classmodel.reflect.Type type)
- Specified by:
isAllowedTypein 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:
isApplicationTypein 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:
getTypein 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:
getApplicationClassLoaderin 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:
getAnnotationInfoin interfaceApiContext- Returns:
- the aggregated annotation info of type
-
-