You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@johnzon.apache.org by rm...@apache.org on 2022/08/08 17:19:10 UTC
[johnzon] branch master updated: ensure sub pojogenerators can have the schema they relate to
This is an automated email from the ASF dual-hosted git repository.
rmannibucau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/johnzon.git
The following commit(s) were added to refs/heads/master by this push:
new 19764534 ensure sub pojogenerators can have the schema they relate to
19764534 is described below
commit 197645342ff8d844765886dd15a0f2b69a3111ff
Author: Romain Manni-Bucau <rm...@gmail.com>
AuthorDate: Mon Aug 8 19:19:07 2022 +0200
ensure sub pojogenerators can have the schema they relate to
---
.../java/org/apache/johnzon/jsonschema/generator/PojoGenerator.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/johnzon-jsonschema/src/main/java/org/apache/johnzon/jsonschema/generator/PojoGenerator.java b/johnzon-jsonschema/src/main/java/org/apache/johnzon/jsonschema/generator/PojoGenerator.java
index 5b02aed8..00989c38 100644
--- a/johnzon-jsonschema/src/main/java/org/apache/johnzon/jsonschema/generator/PojoGenerator.java
+++ b/johnzon-jsonschema/src/main/java/org/apache/johnzon/jsonschema/generator/PojoGenerator.java
@@ -425,7 +425,7 @@ public class PojoGenerator {
.setClassName(className)
.setAddJsonbProperty(configuration.isAddJsonbProperty())
.setAddAllArgsConstructor(configuration.isAddAllArgsConstructor())
- .setOnRef(configuration.getOnRef()))
+ .setOnRef(configuration.getOnRef()), schema)
.visitSchema(schema)
.generate());
return className;
@@ -435,7 +435,7 @@ public class PojoGenerator {
return JsonObject.class.getSimpleName();
}
- protected PojoGenerator newSubPojoGenerator(final PojoConfiguration pojoConfiguration) {
+ protected PojoGenerator newSubPojoGenerator(final PojoConfiguration pojoConfiguration, final JsonObject schema) {
return new PojoGenerator(pojoConfiguration);
}
@@ -467,7 +467,7 @@ public class PojoGenerator {
.setClassName(className)
.setAddJsonbProperty(configuration.isAddJsonbProperty())
.setAddAllArgsConstructor(configuration.isAddAllArgsConstructor())
- .setOnRef(configuration.getOnRef()))
+ .setOnRef(configuration.getOnRef()), schema)
.visitSchema(schema)
.generate());
return className;