diff --git a/release-notes/CREDITS b/release-notes/CREDITS index 50345303..07964f51 100644 --- a/release-notes/CREDITS +++ b/release-notes/CREDITS @@ -52,3 +52,8 @@ Jakub Neubauer (jakubneubauer@github) #77: Schema with enum array - when deserialized, the enum values are lost (2.7.0) + +alexpeelman@github + +#104: HyperSchema does not generate links for nested objects + (2.7.5) diff --git a/release-notes/VERSION b/release-notes/VERSION index 08ee79c3..370cb9dd 100644 --- a/release-notes/VERSION +++ b/release-notes/VERSION @@ -4,6 +4,11 @@ Project: jackson-module-jsonSchema === Releases === ------------------------------------------------------------------------ +2.7.5 (not yet released) + +#104: HyperSchema does not generate links for nested objects + (reported by alexpeelman@github) + 2.7.4 (29-Apr-2016) 2.7.3 (16-Mar-2016) 2.7.2 (26-Feb-2016) diff --git a/src/main/java/com/fasterxml/jackson/module/jsonSchema/customProperties/HyperSchemaFactoryWrapper.java b/src/main/java/com/fasterxml/jackson/module/jsonSchema/customProperties/HyperSchemaFactoryWrapper.java index 25520fa8..86863871 100644 --- a/src/main/java/com/fasterxml/jackson/module/jsonSchema/customProperties/HyperSchemaFactoryWrapper.java +++ b/src/main/java/com/fasterxml/jackson/module/jsonSchema/customProperties/HyperSchemaFactoryWrapper.java @@ -27,16 +27,25 @@ public class HyperSchemaFactoryWrapper extends SchemaFactoryWrapper { private static class HyperSchemaFactoryWrapperFactory extends WrapperFactory { @Override public SchemaFactoryWrapper getWrapper(SerializerProvider p) { - SchemaFactoryWrapper wrapper = new HyperSchemaFactoryWrapper(); - wrapper.setProvider(p); - return wrapper; + return new HyperSchemaFactoryWrapper(p); }; + + @Override + public SchemaFactoryWrapper getWrapper(SerializerProvider p, VisitorContext rvc) + { + return new HyperSchemaFactoryWrapper(p) + .setVisitorContext(rvc); + } }; public HyperSchemaFactoryWrapper() { super(new HyperSchemaFactoryWrapperFactory()); } + public HyperSchemaFactoryWrapper(SerializerProvider p) { + super(p, new HyperSchemaFactoryWrapperFactory()); + } + @Override public JsonObjectFormatVisitor expectObjectFormat(JavaType convertedType) { ObjectVisitor visitor = ((ObjectVisitor)super.expectObjectFormat(convertedType)); @@ -117,5 +126,4 @@ private JsonSchema fetchSchema(Class targetSchema) { } return null; } - }