Skip to content

Commit

Permalink
Merge pull request #170 from bolshoydi/fix_168
Browse files Browse the repository at this point in the history
Fix 168
  • Loading branch information
chenjr0719 authored May 7, 2020
2 parents 0aa81c8 + 478cc3a commit 67aaf34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion sanic_openapi/swagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ def build_spec(app, loop):
"required": consumer.required,
"in": consumer.location,
"name": consumer.field.name
if hasattr(consumer.field, "name")
if not isinstance(consumer.field, type)
and hasattr(consumer.field, "name")
else "body",
}

Expand Down
2 changes: 1 addition & 1 deletion tests/test_fields.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from datetime import date, datetime

import pytest
from sanic.response import HTTPResponse, text

import pytest
from sanic_openapi import doc


Expand Down

0 comments on commit 67aaf34

Please sign in to comment.