Skip to content

Commit

Permalink
fix getattr default
Browse files Browse the repository at this point in the history
  • Loading branch information
denisovkv committed Oct 18, 2020
1 parent be991ee commit 0a8d0e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sanic_openapi/doc.py
Expand Up @@ -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("_")
Expand Down

0 comments on commit 0a8d0e9

Please sign in to comment.