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

Add partial response collection type #10

Open
wants to merge 7 commits into
base: gh-pages
Choose a base branch
from
Open
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions versions/1.0/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,39 @@ A `Collection` **MAY** have the following:
}
```

## <a href="#document-components-collection" id="document-components-collection" class="headerlink"></a> Sparse Field Sets (Optional)
Server **MAY** support an ability to return only specific fields requested by client.
* `fields`: query string parameter comma delimited list of fields. May include nested json fields using json pointers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest "json pointers" is a link to https://tools.ietf.org/html/rfc6901

Has the same attributes as Collection type except resource items are limited to only requested fields.
```json
{
"@id": "/users?fields=/given_name,/address/zip",
"@type": "Collection",
"items": [
{
"@id": "/users/1",
"@type": "User",
"given_name": "Hubert",
"address": {
"zip": "90094"
}
},
{
"@id": "/users/1",
"@type": "User",
"given_name": "Philip",
"address":{
"zip": "90094"
}
},
...
],
"total_items": 20
}
```



## <a href="#document-entry-point" id="document-entry-point" class="headerlink"></a> Entry Point

An `EntryPoint` is a type of [node](#document-components-node) used to represent a resource that clients can use to get more information about an API and provide [links](#document-components-link-collection) to traverse.
Expand Down