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

Bugfix/async security check #1512

Merged
merged 2 commits into from
Apr 16, 2022

Conversation

Ruwann
Copy link
Member

@Ruwann Ruwann commented Apr 12, 2022

Fixes #1509 .

Changes proposed in this pull request:

  • Add tests for aiohttp
  • Use for ... else construct to check for any succeeding security functions

@Ruwann Ruwann force-pushed the bugfix/async-security-check branch 2 times, most recently from ad2a57e to e44b416 Compare April 13, 2022 21:09
@Ruwann Ruwann force-pushed the bugfix/async-security-check branch 2 times, most recently from cd8402f to 4782c0d Compare April 15, 2022 18:03
@Ruwann Ruwann force-pushed the bugfix/async-security-check branch from 4782c0d to c6a754a Compare April 15, 2022 18:12
@Ruwann Ruwann marked this pull request as ready for review April 15, 2022 18:23
Copy link
Member

@RobbeSneyders RobbeSneyders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx @Ruwann!

@RobbeSneyders RobbeSneyders merged commit c71b116 into spec-first:v2 Apr 16, 2022
RobbeSneyders added a commit that referenced this pull request May 4, 2022
* Fix uri parsing for query parameter with empty brackets (#1501)

* Update tests for changed werkzeug behavior in 2.1 (#1506)

pallets/werkzeug#2352

* Bugfix/async security check (#1512)

* Add failing tests

* Use for else construct

* openapi: remove JSON body second validation and type casting (#1170)

* openapi: remove body preprocessing

Body is already validated using jsonschema. There was also some type
casting but it was wrong: e.g. not recurring deeply into dicts and lists,
relying on existence of "type" in schema (which is not there e.g. if
oneOf is used). Anyway, the only reason why types should be casted is
converting integer values to float if the type is number. But this is in
most cases irrelevant.

Added an example, which did not work before this commit (echoed `{}`)
e.g. for
```
curl localhost:8080/api/foo -H 'content-type: application/json' -d
'{"foo": 1}'
```
but now the example works (echoes `{"foo": 1}`).

* test with oneOf in the requestBody

* remove oneof examples: superseded by tests

Co-authored-by: Pavol Vargovcik <pavol.vargovcik@kiwi.com>

Co-authored-by: Ruwann <ruwanlambrichts@gmail.com>
Co-authored-by: Pavol Vargovčík <pavol.vargovcik@gmail.com>
Co-authored-by: Pavol Vargovcik <pavol.vargovcik@kiwi.com>
@Ruwann Ruwann deleted the bugfix/async-security-check branch May 20, 2022 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants