Skip to content

Commit

Permalink
Fix inline enum only string literal (#445)
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron Harper <aharper@duosecurity.com>
  • Loading branch information
amh4r and Aaron Harper authored Jun 9, 2021
1 parent bd02d06 commit 03959a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion datamodel_code_generator/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
Tuple,
Type,
TypeVar,
Union,
)

from pydantic import create_model
Expand Down Expand Up @@ -71,7 +72,7 @@ class DataType(_BaseModel):
is_dict: bool = False
is_list: bool = False
is_custom_type: bool = False
literals: List[str] = []
literals: List[Union[int, str]] = []
use_standard_collections: bool = False
use_generic_container: bool = False
alias: Optional[str] = None
Expand Down

0 comments on commit 03959a4

Please sign in to comment.