Skip to content

Commit

Permalink
Update v3.py - Fix a fallback error when a type of type is passed in
Browse files Browse the repository at this point in the history
The type that is not being properly handled is "type". Odd, for certain, but never an issue before the latest version of BlackSheep.
  • Loading branch information
mmangione authored Apr 22, 2024
1 parent c371b65 commit de2667a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blacksheep/server/openapi/v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def _get_array_outer_type(self, field_info):
except AttributeError:
# Pydantic v2
# Here we support only simple types
return field_info.annotation if type(field_info.annotation) is list else List[field_info.annotation.__args__[0]]
return field_info.annotation if type(field_info.annotation) is type else List[field_info.annotation.__args__[0]]

def _get_fields_info(self, object_type):
try:
Expand Down

0 comments on commit de2667a

Please sign in to comment.