Package io.smallrye.openapi.spring
Class SpringParameterProcessor
java.lang.Object
io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
io.smallrye.openapi.spring.SpringParameterProcessor
Copied from JAX-RS.
This still needs work. As we add test cases we will clean this up
- Author:
- Phillip Kruger (phillip.kruger@redhat.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
AbstractParameterProcessor.ParameterContext, AbstractParameterProcessor.ParameterContextKey -
Field Summary
Fields inherited from class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
APPLICATION_FORM_URLENCODED, beanValidationScanner, contextPath, extensions, formMediaType, formParams, index, matrixParams, params, readerFunction, scannerContext -
Method Summary
Modifier and TypeMethodDescriptionprotected Set<org.jboss.jandex.DotName> protected Stringprotected FrameworkParameterprotected Patternprotected booleanisParameter(org.jboss.jandex.DotName annotationName) protected booleanisResourceMethod(org.jboss.jandex.MethodInfo method) protected booleanisSubResourceLocator(org.jboss.jandex.MethodInfo method) protected StringpathOf(org.jboss.jandex.AnnotationTarget target) static ResourceParametersprocess(AnnotationScannerContext context, String contextPath, org.jboss.jandex.ClassInfo resourceClass, org.jboss.jandex.MethodInfo resourceMethod, Function<org.jboss.jandex.AnnotationInstance, org.eclipse.microprofile.openapi.models.parameters.Parameter> reader, List<AnnotationScannerExtension> extensions) Process parameter annotations for the given class and method.This method operates in two phases.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
addEncoding, fullPathOf, generatePath, getDefaultFormMediaType, getDefaultValue, getFormBodyContent, getParameters, getType, getUnannotatedPathParameter, hasParameters, isIgnoredParameter, isReadableParameterAnnotation, lastPathSegmentOf, paramName, primitiveToObject, process, processFinalize, processOperationParameters, processPathParameters, readAnnotatedType, readFrameworkParameter, readParameter, readParameterAnnotation, readParameterAnnotation, readParameters, readParametersInherited, reset, resolveType, setMediaType, setSchemaProperties, styleOf
-
Method Details
-
process
public static ResourceParameters process(AnnotationScannerContext context, String contextPath, org.jboss.jandex.ClassInfo resourceClass, org.jboss.jandex.MethodInfo resourceMethod, Function<org.jboss.jandex.AnnotationInstance, org.eclipse.microprofile.openapi.models.parameters.Parameter> reader, List<AnnotationScannerExtension> extensions) 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 Spring resource method, annotated with one of the Spring HTTP annotationsreader- callback method for a function producingParameterfrom aParameterextensions- scanner extensions- Returns:
- scanned parameters and modified path contained in a
ResourceParametersobject
-
getTemplateParameterPattern
- Specified by:
getTemplateParameterPatternin classAbstractParameterProcessor
-
getMatrixParameter
- Specified by:
getMatrixParameterin classAbstractParameterProcessor
-
readAnnotatedType
protected void readAnnotatedType(org.jboss.jandex.AnnotationInstance annotation, org.jboss.jandex.AnnotationInstance beanParamAnnotation, boolean overriddenParametersOnly) - Specified by:
readAnnotatedTypein classAbstractParameterProcessor
-
getDefaultAnnotationNames
- Overrides:
getDefaultAnnotationNamesin classAbstractParameterProcessor
-
getDefaultAnnotationProperty
- Overrides:
getDefaultAnnotationPropertyin classAbstractParameterProcessor
-
pathOf
- Specified by:
pathOfin classAbstractParameterProcessor
-
isSubResourceLocator
protected boolean isSubResourceLocator(org.jboss.jandex.MethodInfo method) - Specified by:
isSubResourceLocatorin classAbstractParameterProcessor
-
isResourceMethod
protected boolean isResourceMethod(org.jboss.jandex.MethodInfo method) - Specified by:
isResourceMethodin classAbstractParameterProcessor
-
isParameter
protected boolean isParameter(org.jboss.jandex.DotName annotationName) - Specified by:
isParameterin classAbstractParameterProcessor
-