I am trying to do something like the following:
In my schema JSON models section:
"MyObject": {
"type": "object",
"description": "my description",
"properties": {
"type": "string",
"description": "my property description",
"customAnnotation": "true"
}
}
So right out of the gate, I'm trying to extend JSON Schema - likely my first problem. However, I do not know how to do this legitimately, if that is even possible.
Snippet for use case for "customAnnotation" the moustache template (-l spring):
{{#vars}}
{{^customAnnotation}}@CustomAnnotation {{/customAnnotation}}public {{{datatypeWithEnum}}} {{getter}}() {
return {{name}};
}
{{/vars}}
Can I actually do something like this? clues helpful (yes, I'm a newbie in this area)!
Note: I would also like to use the count of found "customAnnotation" > 0 to annotate a class. Something like:
{{^containsCustomAnnotations}}@ContainsCustomAnnotations {{/hasCustomAnnotation}}public void MyClass {
}
Thanks!