-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't generate response variants for status codes that don't have an …
…associated type. The spec does not record any possible HTTP status codes other than HTTP 200, 201, 202 and 401. But in common operation, many APIs can fail with HTTP 403, GETs on non-existent resources can fail with HTTP 404, and PUTs on resources with the wrong resource version can fail with HTTP 409. This commit ignores all variants that don't have an associated type in the spec. This commit also changes the `Other` variant to have a `Result<Option<serde_json::Value>, serde_json::Error>` value. This allows the variant to handle the common case where the response contains a JSON value, but still allow the case of non-JSON content that the user should parse from the response body manually. Fixes #40 Fixes #41
- Loading branch information
Arnavion
committed
Apr 22, 2019
1 parent
2cb747b
commit f197a2b
Showing
628 changed files
with
93,409 additions
and
25,029 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.