As described in #79, a change that I'd put in improve and optimize reference expansion in #75 unfortunately had the effect of breaking expansion when it came to hyper-schema links.
This patch corrects that problem by making links behave more like schemas so that they can be hydrated from a different reference object just like a schema can. Also adds a new Attributes module to better extract and test attribute handling.
The only unusual part of the implementation is that I had to move Link attributes into the Schema class so that it's possible to copy them over when expanding a reference. The old Link class still works as before though, so this change is backward compatible.
As described in #79, a change that I'd put in improve and optimize reference expansion in #75 unfortunately had the effect of breaking expansion when it came to hyper-schema links.
This patch corrects that problem by making links behave more like schemas so that they can be hydrated from a different reference object just like a schema can. Also adds a new
Attributes
module to better extract and test attribute handling.The only unusual part of the implementation is that I had to move
Link
attributes into theSchema
class so that it's possible to copy them over when expanding a reference. The oldLink
class still works as before though, so this change is backward compatible.Fixes #79.