FasterXML / FasterXML/jackson-module-jsonSchema
Using @XmlEnum to generate an enum of type Integer in json schema
- Lingua principale
- Java
- Stelle
- 387
- Fork
- 136
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.