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 the OpenAPI, and the current path in the API.
    • Method Detail

      • getApi

        org.eclipse.microprofile.openapi.models.OpenAPI getApi()
        The current OpenAPI 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