FasterXML / FasterXML/jackson-module-jsonSchema
Combined SchemaFactoryWrapper
- 主要語言
- 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 還沒有評估資料。