FasterXML / FasterXML/jackson-module-jsonSchema

Combined SchemaFactoryWrapper

オープン
#74 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
387
フォーク
136
PR マージ指標
30日以内にマージされた PR はありません

説明

I'm using the `HyperSchemaFactoryWrapper` to generate schema `links`, now I'd like to add validation patterns through `ValidationSchemaFactoryWrapper` and write some other wrappers for additional properties. Is it possibile?
I'm using this code:

``` java
ObjectMapper mapper = new ObjectMapper();
SchemaFactoryWrapper hyperVisitor = new HyperSchemaFactoryWrapper();
SchemaFactoryWrapper validationVisitor = new ValidationSchemaFactoryWrapper();
mapper.acceptJsonFormatVisitor(MyBean.class, hyperVisitor);
mapper.acceptJsonFormatVisitor(MyBean.class, validationVisitor);
JsonSchema hyperSchema = hyperVisitor.finalSchema();
JsonSchema validationSchema = validationVisitor.finalSchema();

```

since the `JsonSchema` is generated by the `SchemaFactoryWrapper.finalSchema()` I can easily get two distinct schemas but I'm not able to see how can I get a single schema with the two visitors combined.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

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

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