Skip to content

Commit e90b9cf

Browse files
committed
Issue #67.
1 parent 34907b3 commit e90b9cf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler/src/main/java/org/hisrc/jsonix/compilation/jsonschema/JsonSchemaMappingCompiler.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ private void addElementInfos(final JsonSchemaBuilder schema) {
8686
new JsonSchemaBuilder().addAllOf(qNameRef).addAllOf(nameConstant));
8787

8888
elementInfoSchema.addProperty(JsonixConstants.VALUE_PROPERTY_NAME,
89-
createTypeInfoSchemaRef(elementInfo, typeInfo));
89+
getTypeInfoProducer(elementInfo, typeInfo).createTypeInfoSchemaRef(this));
9090

9191
elementInfoSchema.add(JsonixJsonSchemaConstants.ELEMENT_NAME_PROPERTY_NAME,
9292
new JsonSchemaBuilder()
@@ -95,7 +95,7 @@ private void addElementInfos(final JsonSchemaBuilder schema) {
9595
elementName.getNamespaceURI()));
9696
if (scope != null) {
9797
elementInfoSchema.add(JsonixJsonSchemaConstants.SCOPE_PROPERTY_NAME,
98-
createTypeInfoSchemaRef(scope, scope));
98+
getTypeInfoProducer(elementInfo, typeInfo).createTypeInfoSchemaRef(this));
9999
}
100100
schema.addAnyOf(elementInfoSchema);
101101
}

compiler/src/main/java/org/hisrc/jsonix/compilation/jsonschema/typeinfo/ClassInfoProducer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public JsonSchemaBuilder compile(JsonSchemaMappingCompiler<T, C> mappingCompiler
4545
final MClassTypeInfo<T, C, ?> baseTypeInfo = classInfo.getBaseTypeInfo();
4646
final JsonSchemaBuilder typeInfoSchema;
4747
if (baseTypeInfo != null) {
48-
final JsonSchemaBuilder baseTypeInfoSchema = mappingCompiler.createTypeInfoSchemaRef(baseTypeInfo,
49-
baseTypeInfo);
48+
final JsonSchemaBuilder baseTypeInfoSchema = mappingCompiler.getTypeInfoProducer(baseTypeInfo, baseTypeInfo)
49+
.createTypeInfoSchemaRef(mappingCompiler);
5050
typeInfoSchema = new JsonSchemaBuilder();
5151
typeInfoSchema.addAllOf(baseTypeInfoSchema);
5252
typeInfoSchema.addAllOf(classInfoSchema);

0 commit comments

Comments
 (0)