FasterXML / FasterXML/jackson-module-jsonSchema

Using @XmlEnum to generate an enum of type Integer in json schema

オープン
#49 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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 はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。