我正在尝试执行以下操作:
在我的架构JSON模型部分:
"MyObject": {
"type": "object",
"description": "my description",
"properties": {
"type": "string",
"description": "my property description",
"customAnnotation": "true"
}
}
因此,我正试图扩展JSON Schema - 可能是我的第一个问题。但是,如果可能的话,我不知道如何合法地做到这一点。
用于" customAnnotation"的用例的片段小胡子模板(-l spring):
{{#vars}}
{{^customAnnotation}}@CustomAnnotation {{/customAnnotation}}public {{{datatypeWithEnum}}} {{getter}}() {
return {{name}};
}
{{/vars}}
我真的可以这样做吗?线索有帮助(是的,我是这个领域的新手)!
注意:我还想使用找到的" customAnnotation" > 0来注释一个类。类似的东西:
{{^containsCustomAnnotations}}@ContainsCustomAnnotations {{/hasCustomAnnotation}}public void MyClass {
}
谢谢!