Interface OperationIdGenerator

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface OperationIdGenerator
Interface that may be implemented to generate custom operationId values. Three built-in generators may be used by specifying an operationIdStrategy configuration property value of METHOD, CLASS_METHOD, or PACKAGE_CLASS_METHOD. Otherwise, an fully-qualified implementation name may be given for a custom generator.
Since:
4.1.2
  • Method Summary

    Modifier and Type
    Method
    Description
    generateOperationId(org.jboss.jandex.ClassInfo resourceClass, org.jboss.jandex.MethodInfo method)
    Derive an operationId given the Jandex resource ClassInfo and MethodInfo.
    load(String strategyName, ClassLoader loader)
    Loads an OperationIdGenerator instance by name.
  • Method Details

    • generateOperationId

      String generateOperationId(org.jboss.jandex.ClassInfo resourceClass, org.jboss.jandex.MethodInfo method)
      Derive an operationId given the Jandex resource ClassInfo and MethodInfo.
      Parameters:
      resourceClass - the resource class. E.g. a Jakarta REST end-point class
      method - the resource method. E.g. a Jakarta REST end-point method. This may be declared in a class other than the resourceClass such as a parent class or interface.
      Returns:
      value to be used for the OpenAPI operationId
    • load

      static OperationIdGenerator load(String strategyName, ClassLoader loader)
      Loads an OperationIdGenerator instance by name. If providing a fully-qualified implementation class name, the class must be loadable using the provided ClassLoader. The loader is not required or used when one of the built-in strategy names is provided.
      Parameters:
      strategyName - name of the OperationIdGenerator to load
      loader - ClassLoader to load a custom implementation, if necessary
      Returns:
      the requested OperationIdGenerator