Class AbstractAnnotationScanner
- java.lang.Object
-
- io.smallrye.openapi.runtime.scanner.spi.AbstractAnnotationScanner
-
- All Implemented Interfaces:
AnnotationScanner
public abstract class AbstractAnnotationScanner extends Object implements AnnotationScanner
Abstract base class for annotation scanners- Author:
- Phillip Kruger (phillip.kruger@redhat.com)
-
-
Field Summary
Fields Modifier and Type Field Description protected StringcurrentAppPath
-
Constructor Summary
Constructors Constructor Description AbstractAnnotationScanner()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static StringcreatePathFromSegments(String... segments)Make a path out of a number of path segments.String[]getDefaultConsumes(AnnotationScannerContext context, org.jboss.jandex.MethodInfo methodInfo, ResourceParameters params)String[]getDefaultProduces(AnnotationScannerContext context, org.jboss.jandex.MethodInfo methodInfo)protected StringmakePath(String operationPath)protected static booleanprocessProfiles(OpenApiConfig config, org.eclipse.microprofile.openapi.models.Extensible<?> extensible)Checks if the given extensible contains profiles, and if the extensible should be included in the final openapi document.voidsetContextRoot(String path)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.smallrye.openapi.runtime.scanner.spi.AnnotationScanner
addApiReponseFromAnnotation, addApiReponseSchemaFromAnnotation, clearJsonViewContext, containsScannerAnnotations, createResponseFromRestMethod, generateResponse, getConsumes, getConsumesForRequestBody, getDefaultStatus, getKotlinContinuationArgument, getName, getReasonPhrase, getRequestBodyParameterClassType, getResourceMethods, hasKotlinContinuation, isAsyncResponse, isDeleteMethod, isEmptySecurityRequirements, isFrameworkContextType, isKotlinContinuation, isMultipartInput, isMultipartOutput, isPathParameter, isPostMethod, isScannerInternalParameter, isScannerInternalResponse, isScannerInternalResponse, isVoidResponse, isWrapperType, kotlinContinuationToSchema, processCallback, processDefinitionAnnotation, processExtensions, processJavaSecurity, processOperation, processOperationTags, processRequestBody, processResponse, processScannerExtensions, processSecurityRequirementAnnotation, processSecuritySchemeAnnotation, processServerAnnotation, processServerAnnotation, processTags, responseCodeExistInMethodAnnotations, scan, setJsonViewContext, setOperationOnPathItem, setRequestBodyConstraints, unwrapType
-
-
-
-
Field Detail
-
currentAppPath
protected String currentAppPath
-
-
Method Detail
-
setContextRoot
public void setContextRoot(String path)
- Specified by:
setContextRootin interfaceAnnotationScanner
-
createPathFromSegments
protected static String createPathFromSegments(String... segments)
Make a path out of a number of path segments.- Parameters:
segments- String paths- Returns:
- Path built from the segments
-
processProfiles
protected static boolean processProfiles(OpenApiConfig config, org.eclipse.microprofile.openapi.models.Extensible<?> extensible)
Checks if the given extensible contains profiles, and if the extensible should be included in the final openapi document. Any extension containing a profile is removed from the extensible. inclusion is then calculated based on all collected profiles.- Parameters:
config- current configextensible- the extensible to check for profiles- Returns:
- true, if the given extensible should be included in the final openapi document, otherwise false
-
getDefaultConsumes
public String[] getDefaultConsumes(AnnotationScannerContext context, org.jboss.jandex.MethodInfo methodInfo, ResourceParameters params)
- Specified by:
getDefaultConsumesin interfaceAnnotationScanner
-
getDefaultProduces
public String[] getDefaultProduces(AnnotationScannerContext context, org.jboss.jandex.MethodInfo methodInfo)
- Specified by:
getDefaultProducesin interfaceAnnotationScanner
-
-