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 1 commit
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
Next Next commit
Add partial response collection type
  • Loading branch information
Sergii Bezzubchenko committed Jan 8, 2019
commit c646d6f17c26f47cac248e57b54fee6afd49b09a
25 changes: 25 additions & 0 deletions versions/1.0/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,31 @@ A `Collection` **MAY** have the following:
}
```

## <a href="#document-components-collection" id="document-components-collection" class="headerlink"></a> Partial Collection
A `PartialCollection` is a type of [node](#document-components-node) used to represent a a specifie resource fields based on query string parameter
* `fields`: query string parameter comma delimited list of fields. May include nested json fields separated by dot
Has the same attributes as Collection time except resource items are limited to only requested fields.
```json
{
"@id": "/users?fields=given_name,address.zip",
"@type": "PartialCollection",
"items": [
{
"given_name": "Hubert",
"address.zip": "90094"
},
{
"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