I must admit I am new to JSON:API or HATEOS, but since directly following those links leads to a '400 bad request' page, and removing them leads to the correct page, to me this looks like a bug.
In DirectorModelAssembler, it looks like some 'templatedLink' is being used, which includes curly braces around the parameters, which are then included in the end result instead of being rendered. In MovieModelAssembler, there is some string replacement happening to filter out the curly brace for the self link, so it looks to be a known issue.
When running the example project on the main branch (latest commit at the time of writing: 41e057ca0e0b3b110710106faa2d68459c03db7f, but the behaviour seems to be consistent with the v2.0.0 tag), the links to individual directors (on the
/directors
endpoint) contain curly braces where they shouldn't: http://localhost:8080/api/directors/1{?include,fields[directors]} http://localhost:8080/api/directors{?page[number],page[size]} which then leads to this outputI must admit I am new to JSON:API or HATEOS, but since directly following those links leads to a '400 bad request' page, and removing them leads to the correct page, to me this looks like a bug.
In
DirectorModelAssembler
, it looks like some 'templatedLink' is being used, which includes curly braces around the parameters, which are then included in the end result instead of being rendered. InMovieModelAssembler
, there is some string replacement happening to filter out the curly brace for the self link, so it looks to be a known issue.A second bug I encountered in the demo, is that MovieModelAssembler is trying to link to http://localhost:8080/api/movies/1/relationships/directors which is not an implemented endpoint.
These broken examples make it hard to understand how I'm supposed to use this library