Class ApiSpecGeneratorUtils


  • public class ApiSpecGeneratorUtils
    extends Object
    Helper methods for generation API documentation.
    • Method Detail

      • shouldBeDocumented

        public static boolean shouldBeDocumented​(MessageHeaders<? extends RequestBody,​? extends ResponseBody,​? extends MessageParameters> spec)
        Checks whether the given endpoint should be documented.
        Parameters:
        spec - endpoint to check
        Returns:
        true if the endpoint should be documented
      • findAdditionalFieldType

        public static Optional<Class<?>> findAdditionalFieldType​(Class<?> clazz)
        Find whether the class contains dynamic fields that need to be documented.
        Parameters:
        clazz - class to check
        Returns:
        optional that is non-empty if the class is annotated with FlinkJsonSchema.AdditionalFields