X Tutup
The Wayback Machine - https://web.archive.org/web/20201102214915/https://github.com/microsoft/api-guidelines/pull/218
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

Change per Issue #217 recommendations #218

Open
wants to merge 3 commits into
base: vNext
from

Conversation

@sublimemm
Copy link

@sublimemm sublimemm commented Sep 14, 2020

Service providers are unclear if they should return 404s when collection searches have no results. Per the advice in the issue 217 thread the recommendation is to NOT return a 404 in these cases and instead maintain consistency in their response and signifying no results as value containing an empty array.

"We would always say that should return a 200 with an empty collection. The call succeeded, the collection exists. There's just nothing in it.

Given we always follow the convention of having the array itself be a 'value' property on a top-level object representing the collection itself, there's also the ability to return collection metadata that is valid regardless of whether there is anything in the collection, e.g. MaxItems." -- Gareth Jones

sublimemm added 2 commits Sep 14, 2020
Service providers are unclear if they should return 404s when collection searches have no results. Per the advice in the issue 217 thread the recommendation is to NOT return a 404 in these cases and instead maintain consistency in their response and signifying no results as _value_  containing an empty array.

"We would always say that should return a 200 with an empty collection. The call succeeded, the collection exists. There's just nothing in it.

Given we always follow the convention of having the array itself be a 'value' property on a top-level object representing the collection itself, there's also the ability to return collection metadata that is valid regardless of whether there is anything in the collection, e.g. MaxItems." -- Gareth Jones
moving to a new section. 9.10.
@microsoft-cla
Copy link

@microsoft-cla microsoft-cla bot commented Sep 14, 2020

CLA assistant check
All CLA requirements met.

Copy link
Member

@garethj-msft garethj-msft left a comment

Thanks - I've a couple of comments I'd like you to address.

Guidelines.md Outdated Show resolved Hide resolved
Guidelines.md Outdated Show resolved Hide resolved
Guidelines.md Show resolved Hide resolved
@sublimemm sublimemm requested a review from garethj-msft Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.
X Tutup