From e2c4473480c9299da8f5f1a43958836c5bd833b2 Mon Sep 17 00:00:00 2001 From: Roman Tolkachyov Date: Thu, 9 Jan 2025 00:32:14 +0300 Subject: [PATCH] fix use empty list default to empty list Co-authored-by: Stephen Finucane --- sphinxcontrib/openapi/openapi31.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinxcontrib/openapi/openapi31.py b/sphinxcontrib/openapi/openapi31.py index 56bb4f1..a565a6b 100644 --- a/sphinxcontrib/openapi/openapi31.py +++ b/sphinxcontrib/openapi/openapi31.py @@ -302,7 +302,7 @@ def _get_type_from_schema(schema): dtype = schema["type"] else: dtype = set() - for t in schema.get("anyOf", schema.get("allOf")): + for t in schema.get("anyOf", schema.get("allOf", [])): if "format" in t.keys(): dtype.add(t["format"]) else: