FasterXML / FasterXML/jackson-module-jsonSchema
Using @XmlEnum to generate an enum of type Integer in json schema
未關閉
- 主要語言
- Java
- 星號
- 387
- 分支
- 136
- PR 合併指標
- 30 天內沒有已合併 PR
描述
I have the following Java enum:
@XmlType
@XmlEnum(Integer.class)
public enum DefaultMessageVersion
{
@XmlEnumValue("1") ONE;
}
That is producing the following json schema snippet:
"defaultMessageVersion" : {
"type" : "string",
"enum" : [ "1" ]
}
This is because (I believe) Jackson ignores the @XmlEnum annotation. I would like the outputted snippet to have "type" : "integer" (or int? I'm not 100% sure which it is). I'm going to attempt to write the functionality myself, but would appreciate any pointers on where to get started, or a head-up if I'm just wrong about why it's not working.
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。