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 ([email protected])
  • Field Details

  • Constructor Details

    • AbstractAnnotationScanner

      public AbstractAnnotationScanner()
  • Method Details

    • setContextRoot

      public void setContextRoot(String path)
      Specified by:
      setContextRoot in interface AnnotationScanner
    • makePath

      protected String makePath(String operationPath)
    • 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 config
      extensible - 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:
      getDefaultConsumes in interface AnnotationScanner
    • getDefaultProduces

      public String[] getDefaultProduces(AnnotationScannerContext context, org.jboss.jandex.MethodInfo methodInfo)
      Specified by:
      getDefaultProduces in interface AnnotationScanner