diff --git a/sphinxcontrib/openapi/openapi31.py b/sphinxcontrib/openapi/openapi31.py index eb3a7e0..da27d70 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["anyOf"]: + for t in schema.get("anyOf", schema.get("allOf", [])): if "format" in t.keys(): dtype.add(t["format"]) else: