Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Understanding the format: How to include addition info in collection response #86

Open
pke opened this issue Jun 23, 2017 · 1 comment

Comments

@pke
Copy link

pke commented Jun 23, 2017

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?

Thanks for helping out here.

@jdougan
Copy link

jdougan commented Jun 25, 2017

Have you seen issue #54 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants