Provide some utility methods for annotation closure builders. Such as methods to extract properties from OpenAPI annotation.
Require implementing class has below properties: - "openApiAnnotation" property, related OpenAPI annotation class. - "model" property, the OpenAPI model object.Require implementing class call initPrimitiveElements() in their constructor.
| Type Params | Return Type | Name and description |
|---|---|---|
<M> |
M |
evaluateClosure(groovy.lang.Closure closure, AnnotationBuilder<M> builder)Evaluate closure by delegating to builder and return the production model. |
|
java.lang.Object |
initAnnotationPrimitiveElements() |
|
java.lang.Object |
initClassPrimitiveProperties() |
|
java.lang.Object |
initPrimitiveElements()Extract properties from OpenAPI annotation |
|
java.lang.Object |
isPrimitiveElement(java.lang.Object elementType) |
|
java.lang.Object |
methodMissing(java.lang.String name, java.lang.Object args)For string and string[] annotation attributes we will assign the value to model property. |
The builder's production, should be override by implementing class
The reader that use these builders
Evaluate closure by delegating to builder and return the production model.
closure - api doc closurebuilder - annotation builderExtract properties from OpenAPI annotation
For string and string[] annotation attributes we will assign the value to model property.
name - method nameargs - method arguments