Class TemplateUtil
java.lang.Object
nl.datasteel.crudcraft.codegen.writer.TemplateUtil
Utility helpers for common annotation templates used by writers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.squareup.javapoet.AnnotationSpec
Generates an OpenAPI Schema annotation with a description.static com.squareup.javapoet.AnnotationSpec
schemaAllowable
(List<String> values) Generates an OpenAPI Schema annotation with a list of allowable values.
-
Method Details
-
schema
Generates an OpenAPI Schema annotation with a description.- Parameters:
desc
- the description to include in the Schema annotation- Returns:
- an AnnotationSpec for the Schema annotation with the given description
-
schemaAllowable
Generates an OpenAPI Schema annotation with a list of allowable values. The values are formatted as a comma-separated string enclosed in quotes.- Parameters:
values
- the list of allowable values- Returns:
- an AnnotationSpec for the Schema annotation with allowable values
-