Package org.apache.flink.docs.rest
Class ApiSpecGeneratorUtils
- java.lang.Object
-
- org.apache.flink.docs.rest.ApiSpecGeneratorUtils
-
public class ApiSpecGeneratorUtils extends Object
Helper methods for generation API documentation.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<Class<?>>
findAdditionalFieldType(Class<?> clazz)
Find whether the class contains dynamic fields that need to be documented.static boolean
shouldBeDocumented(MessageHeaders<? extends RequestBody,? extends ResponseBody,? extends MessageParameters> spec)
Checks whether the given endpoint should be documented.
-
-
-
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
-
-