FasterXML / FasterXML/jackson-module-jsonSchema
Using @XmlEnum to generate an enum of type Integer in json schema
- Ngôn ngữ chính
- Java
- Star
- 387
- Fork
- 136
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.