diff --git a/sanic_openapi/doc.py b/sanic_openapi/doc.py index cf255d94..5f12aebe 100644 --- a/sanic_openapi/doc.py +++ b/sanic_openapi/doc.py @@ -140,7 +140,9 @@ def definition(self): "properties": { key: serialize_schema(schema) for key, schema in chain( - {key: getattr(self.cls, key) for key in dir(self.cls)}.items(), + { + key: getattr(self.cls, key, None) for key in dir(self.cls) + }.items(), typing.get_type_hints(self.cls).items(), ) if not key.startswith("_")