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

Resources affording other resources actions (linking) #288

Open
zdne opened this Issue Dec 9, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@zdne
Copy link
Contributor

zdne commented Dec 9, 2015

Given this blueprint (currently valid syntax):

# Author [/author/{id}]
- Parameters
    - id (number) - Id of the author
- Attributes
    - email (string) - Email of the author

## Retrieve Author [GET]
- Relation: self
- Response 200 (application/json)   
    - Attributes (Author)

I want to be able express that another resource affords the "Retrieve Author" action without the need to duplicate the "Retrieve Author".

For example like this:

# Blog Post [/blogpost/{id}]
- Parameters
    - id (number) - Id of the Blog Post
- Attributes
    - content (string) - Content of the Blog Post

## Retrieve [GET]
- Relation: self
- Response 200 (application/json)   
    - Attributes (Blog Post)

## Action Retrieve Gist Author 
- Relation: author (Author[self])

This enables linking of the resources and hence HATEOAS description.

To be addressed in draft APIB RFC

@pksunkara

This comment has been minimized.

Copy link
Member

pksunkara commented Dec 9, 2015

Can you please update the last part of the second example? It's not exactly clear. Is it an action?

@zdne

This comment has been minimized.

Copy link
Contributor

zdne commented Dec 10, 2015

@pksunkara that is just a sketch of my idea. Yes, it is introducing the Action keyword (so you do not have to specify a method)

@zdne zdne changed the title Resources affording other resource actions (linking) Resources affording other resources actions (linking) Dec 10, 2015

This was referenced Dec 10, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment