forked from spec-first/connexion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX a typo causing an ERROR log (spec-first#523)
* FIX a typo causing an ERROR log A small bug was introduced in spec-first#500 when sanitizing the request query parameters. Instead of fetching the arguments from `request.query`, the parameters were sanitized from the `request.form`. This causes an error log to be printed, as the parameters are not expected for the query (for example in the case of a POST request). Fixes spec-first#504 * adds a fixture for testing query param sanitazion Adds a simple fixture to test form and query parameter sanitazion. This is mostly related to spec-first#522, in which the `formData` parameters were treated as query parameters. * add a test to validate form data params * introduce testfixtures library
- Loading branch information
Showing
6 changed files
with
51 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,7 @@ def read_version(package): | |
'mock', | ||
'pytest', | ||
'pytest-cov', | ||
'testfixtures', | ||
flask_require | ||
] | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
swagger: "2.0" | ||
info: | ||
title: "{{title}}" | ||
version: "1.0" | ||
basePath: /v1.0 | ||
paths: | ||
/greeting: | ||
post: | ||
summary: Generate greeting | ||
description: Generates a greeting message. | ||
operationId: fakeapi.hello.post_greeting | ||
responses: | ||
'200': | ||
description: greeting response | ||
schema: | ||
type: object | ||
parameters: | ||
- name: name | ||
in: formData | ||
description: Name of the person to greet. | ||
required: true | ||
type: string |