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 Type
    Method
    Description
    protected void
    addEncoding(Map<String,org.eclipse.microprofile.openapi.models.media.Encoding> encodings, String paramName, org.jboss.jandex.AnnotationTarget paramTarget)
     
    protected Set<org.jboss.jandex.DotName>
     
    protected String
     
    protected String
     
    protected io.smallrye.openapi.runtime.scanner.spi.FrameworkParameter
     
    protected Pattern
     
    protected io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor.ParameterContext
    getUnannotatedPathParameter(org.jboss.jandex.MethodInfo resourceMethod, String name)
     
    protected boolean
    isParameter(org.jboss.jandex.DotName annotationName)
     
    protected boolean
    isResourceMethod(org.jboss.jandex.MethodInfo method)
     
    protected boolean
    isSubResourceLocator(org.jboss.jandex.MethodInfo method)
     
    protected List<String>
    pathsOf(org.jboss.jandex.AnnotationTarget target)
     
    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.
    protected void
    processPathParameters(org.jboss.jandex.ClassInfo resourceClass, org.jboss.jandex.MethodInfo resourceMethod, io.smallrye.openapi.runtime.scanner.ResourceParameters parameters)
     
    protected void
    readAnnotatedType(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 the ResourceParameters. Second, method-level parameters are processed. Form parameters are only applicable to the method-level in this component.
      Parameters:
      context - the AnnotationScannerContext
      contextPath - context path for the resource class and method
      resourceClass - the class info
      resourceMethod - the JAX-RS resource method, annotated with one of the JAX-RS HTTP annotations
      Returns:
      scanned parameters and modified path contained in a ResourceParameters object
    • processPathParameters

      protected void processPathParameters(org.jboss.jandex.ClassInfo resourceClass, org.jboss.jandex.MethodInfo resourceMethod, io.smallrye.openapi.runtime.scanner.ResourceParameters parameters)
      Overrides:
      processPathParameters in class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
    • getTemplateParameterPattern

      protected Pattern getTemplateParameterPattern()
      Specified by:
      getTemplateParameterPattern in class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
    • getMatrixParameter

      protected io.smallrye.openapi.runtime.scanner.spi.FrameworkParameter getMatrixParameter()
      Specified by:
      getMatrixParameter in class io.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:
      getUnannotatedPathParameter in class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
    • getDefaultFormMediaType

      protected String getDefaultFormMediaType()
      Overrides:
      getDefaultFormMediaType in class io.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:
      addEncoding in class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
    • readAnnotatedType

      protected void readAnnotatedType(org.jboss.jandex.AnnotationInstance annotation, org.jboss.jandex.AnnotationInstance beanParamAnnotation, boolean overriddenParametersOnly)
      Specified by:
      readAnnotatedType in class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
    • getDefaultAnnotationNames

      protected Set<org.jboss.jandex.DotName> getDefaultAnnotationNames()
      Overrides:
      getDefaultAnnotationNames in class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
    • getDefaultAnnotationProperty

      protected String getDefaultAnnotationProperty()
      Overrides:
      getDefaultAnnotationProperty in class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
    • pathsOf

      protected List<String> pathsOf(org.jboss.jandex.AnnotationTarget target)
      Specified by:
      pathsOf in class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
    • isSubResourceLocator

      protected boolean isSubResourceLocator(org.jboss.jandex.MethodInfo method)
      Specified by:
      isSubResourceLocator in class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
    • isResourceMethod

      protected boolean isResourceMethod(org.jboss.jandex.MethodInfo method)
      Specified by:
      isResourceMethod in class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor
    • isParameter

      protected boolean isParameter(org.jboss.jandex.DotName annotationName)
      Specified by:
      isParameter in class io.smallrye.openapi.runtime.scanner.spi.AbstractParameterProcessor