Package io.smallrye.openapi.jaxrs
Class JaxRsParameterProcessor
java.lang.Object
io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
io.smallrye.openapi.jaxrs.JaxRsParameterProcessor
public class JaxRsParameterProcessor
extends io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
Note, javax.ws.rs.PathParam PathParam targets of javax.ws.rs.core.PathSegment PathSegment are not currently supported.
- Author:
- Michael Edgar <michael@xlate.io>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor.ParameterContext, io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor.ParameterContextKey -
Field Summary
Fields inherited from class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
APPLICATION_FORM_URLENCODED, beanValidationScanner, contextPath, formMediaType, formParams, index, matrixParams, params, resourceClass, resourceMethod, scannerContext -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddEncoding(Map<String, org.eclipse.microprofile.openapi.models.media.Encoding> encodings, String paramName, org.jboss.jandex.AnnotationTarget paramTarget) protected Set<org.jboss.jandex.DotName> protected Stringprotected Stringprotected io.smallrye.openapi.runtime.scanner.spi.FrameworkParameterprotected Patternprotected io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor.ParameterContextgetUnannotatedPathParameter(org.jboss.jandex.MethodInfo resourceMethod, String name) protected booleanisParameter(org.jboss.jandex.DotName annotationName) protected booleanisResourceMethod(org.jboss.jandex.MethodInfo method) protected booleanisSubResourceLocator(org.jboss.jandex.MethodInfo method) pathsOf(org.jboss.jandex.AnnotationTarget target) static io.smallrye.openapi.runtime.scanner.ResourceParametersprocess(io.smallrye.openapi.runtime.scanner.spi.AnnotationScannerContext context, String contextPath, org.jboss.jandex.ClassInfo resourceClass, org.jboss.jandex.MethodInfo resourceMethod) Process parameter annotations for the given class and method.This method operates in two phases.protected voidprocessPathParameters(org.jboss.jandex.ClassInfo resourceClass, org.jboss.jandex.MethodInfo resourceMethod, io.smallrye.openapi.runtime.scanner.ResourceParameters parameters) protected voidreadAnnotatedType(org.jboss.jandex.AnnotationInstance annotation, org.jboss.jandex.AnnotationInstance beanParamAnnotation, boolean overriddenParametersOnly) Methods inherited from class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
fullPathsOf, generatePaths, getDefaultValue, getFormBodyContent, getParameters, getType, hasParameters, isIgnoredParameter, isReadableParameterAnnotation, lastPathSegmentsOf, paramName, primitiveToObject, process, processFinalize, processOperationParameters, readAnnotatedType, readFrameworkParameter, readParameter, readParameterAnnotation, readParameterAnnotation, readParameters, readParametersInherited, reset, resolveType, setMediaType, setSchemaProperties, styleOf, targetMethod, updateFormBodyContent
-
Method Details
-
process
public static io.smallrye.openapi.runtime.scanner.ResourceParameters process(io.smallrye.openapi.runtime.scanner.spi.AnnotationScannerContext context, String contextPath, org.jboss.jandex.ClassInfo resourceClass, org.jboss.jandex.MethodInfo resourceMethod) Process parameter annotations for the given class and method.This method operates in two phases. First, class-level parameters are processed and saved in theResourceParameters. Second, method-level parameters are processed. Form parameters are only applicable to the method-level in this component.- Parameters:
context- the AnnotationScannerContextcontextPath- context path for the resource class and methodresourceClass- the class inforesourceMethod- the JAX-RS resource method, annotated with one of the JAX-RS HTTP annotations- Returns:
- scanned parameters and modified path contained in a
ResourceParametersobject
-
processPathParameters
protected void processPathParameters(org.jboss.jandex.ClassInfo resourceClass, org.jboss.jandex.MethodInfo resourceMethod, io.smallrye.openapi.runtime.scanner.ResourceParameters parameters) - Overrides:
processPathParametersin classio.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
-
getTemplateParameterPattern
- Specified by:
getTemplateParameterPatternin classio.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
-
getMatrixParameter
protected io.smallrye.openapi.runtime.scanner.spi.FrameworkParameter getMatrixParameter()- Specified by:
getMatrixParameterin classio.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
-
getUnannotatedPathParameter
protected io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor.ParameterContext getUnannotatedPathParameter(org.jboss.jandex.MethodInfo resourceMethod, String name) - Overrides:
getUnannotatedPathParameterin classio.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
-
getDefaultFormMediaType
- Overrides:
getDefaultFormMediaTypein classio.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
-
addEncoding
protected void addEncoding(Map<String, org.eclipse.microprofile.openapi.models.media.Encoding> encodings, String paramName, org.jboss.jandex.AnnotationTarget paramTarget) - Overrides:
addEncodingin classio.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
-
readAnnotatedType
protected void readAnnotatedType(org.jboss.jandex.AnnotationInstance annotation, org.jboss.jandex.AnnotationInstance beanParamAnnotation, boolean overriddenParametersOnly) - Specified by:
readAnnotatedTypein classio.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
-
getDefaultAnnotationNames
- Overrides:
getDefaultAnnotationNamesin classio.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
-
getDefaultAnnotationProperty
- Overrides:
getDefaultAnnotationPropertyin classio.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
-
pathsOf
- Specified by:
pathsOfin classio.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
-
isSubResourceLocator
protected boolean isSubResourceLocator(org.jboss.jandex.MethodInfo method) - Specified by:
isSubResourceLocatorin classio.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
-
isResourceMethod
protected boolean isResourceMethod(org.jboss.jandex.MethodInfo method) - Specified by:
isResourceMethodin classio.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
-
isParameter
protected boolean isParameter(org.jboss.jandex.DotName annotationName) - Specified by:
isParameterin classio.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
-