Being new to siren I am struggling with the following scenario.
I have a collection resource that returns a different result based on a query param:
/items?code=FOOBAR
What would be the responses class and properties?
The response would contain the items but I'd like it to also include information about the code, especially when it is about to expire. Would the _links key the right place to put a rel: ["code"] in there that references the code resource where the client could get more info about the code? Could the collection response also already contain parts of the code resource, like the expireDate as inline properties?
Could the expireDate be part of the responses properties?
Being new to siren I am struggling with the following scenario. I have a collection resource that returns a different result based on a query param:
/items?code=FOOBAR
What would be the responses
class
andproperties
?The response would contain the items but I'd like it to also include information about the
code
, especially when it is about to expire. Would the_links
key the right place to put arel: ["code"]
in there that references the code resource where the client could get more info about the code? Could the collection response also already contain parts of thecode
resource, like theexpireDate
as inline properties?Could the
expireDate
be part of the responsesproperties
?Thanks for helping out here.