-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We recently added checks in `stripe-mock` to make sure that the right `Content-Type` was being sent. Unfortunately, the logic was not quite right for deletes, where you occasionally see a `Content-Type` in rare cases, but which usually have empty request bodies, and therefore an empty `Content-Type` is allowed. This patch brings in two fixes: 1. The OpenAPI spec has been tweak so as to not incorrectly include `expand` parameters on `DELETE` operations. This means that most `DELETE` operations have no defined request schema at all. 2. Special cases incoming `DELETE` operations so that they can be checked against a schema if they provide parameters, but are also allowed to specify an empty `Content-Type` as well. Between the two improvements, all edges should be covered. The impetus here is to resolve [1] where a `stripe-mock` upgrade is incompatible with the current code. I've verified that with this patch included, `stripe-python`'s test suite runs successfully. [1] stripe/stripe-python#426
- Loading branch information
Showing
5 changed files
with
101 additions
and
54 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Submodule openapi
updated
4 files
+1 −389 | openapi/spec2.json | |
+3 −262 | openapi/spec2.yaml | |
+29 −578 | openapi/spec3.json | |
+18 −379 | openapi/spec3.yaml |
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