Repository navigation
Web endpoints: match the 422 body and document reason - #30
Merged
Merged
Conversation
- response_error_default: errors is a map of field -> messages, and the body carries no data or statusCode (as the Errors page already says) - WebPage: add the optional reason field sent with some unknown results - web/search, web/contents: add 422 examples, note that unknown top-level fields are ignored and what the include key error means
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes four mismatches between the Web Search / Web Contents docs and what the API returns. Each was checked against the live API.
Changes
response_error_defaultdescribederrorsas an array and listeddataandstatusCode. The API sendserrorsas a map of field name to messages and nodataorstatusCode, which is what the Errors page already says. The schema now matches.content_rejectedandconcurrency_limitedare added to thecodevalues, since the web endpoints already name them in their descriptions.reason.WebPagegains the optionalreasonfield. The API sends"reason": "fetch_failed"with someunknownresults, while the docs saidunknowncomes with no reason.only_domaininstead ofonly_domainsreturns 200 and unfiltered results).include. An unknown key inincludeis refused withThe include field must be an array.The search page explains what that message means.openapi.jsonandopenapi-v2.jsonare identical.Not covered
openapi-v1.jsonstill describes the old error shape.includemessage need an API change.