Closed
Description
I think the best approach will be to have a method in the Link class called "asHalLink" that will create a new HalLink instance. The HalLink class is new and will have the extra attributes.
This would work also if we decide to support Siren in the future, then it just a matter of having a "asSirenLink" method.
I creating a pull request with changes to support this.
It doesn't feel right adding the extra attributes directly to the Link class, at least not in the manner that I've done. An alternate approach would be to just have a map of extra attributes, but that will be more cumbersome to use and use lose type safety.