From f5f5792afaafd5afdccd08e02c5481ddb3feab7e Mon Sep 17 00:00:00 2001 From: p1c2u Date: Fri, 3 Nov 2023 20:35:33 +0000 Subject: [PATCH] Validate empty request body fix --- openapi_core/validation/request/validators.py | 2 ++ tests/integration/test_petstore.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/openapi_core/validation/request/validators.py b/openapi_core/validation/request/validators.py index dc12bb34..2d89b529 100644 --- a/openapi_core/validation/request/validators.py +++ b/openapi_core/validation/request/validators.py @@ -113,6 +113,8 @@ def _iter_errors( try: self._get_body(request.body, request.content_type, operation) + except MissingRequestBody: + pass except RequestBodyValidationError as exc: yield exc diff --git a/tests/integration/test_petstore.py b/tests/integration/test_petstore.py index 59650ad4..33a6457d 100644 --- a/tests/integration/test_petstore.py +++ b/tests/integration/test_petstore.py @@ -1973,6 +1973,8 @@ def test_delete_tags_no_requestbody(self, spec): path_pattern=path_pattern, ) + validate_request(request, spec=spec) + result = unmarshal_request( request, spec=spec, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy