You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 19, 2023. It is now read-only.
@staticmethoddef_get_field_type_name(field_type: Any) ->str:
try:
returnfield_type.__name__exceptAttributeError:
# The types in the 'typing' module lack the __name__ attributematch=re.match(r'typing\.([A-Za-z]+)', str(field_type))
returnstr(field_type) ifmatchisNoneelsematch.group(1)
Setup
Python: v3.10
dataclasses_jsonschema: version 2.14.1 (but tried with the latest version as well.
The text was updated successfully, but these errors were encountered:
Problem
Dataclasses with Python 3.10-compatible typing cause warning when trying to create JSON schema for the class
How to reproduce
Assume the following definition
Running this
causes the following error:
while if I run this
I get this w/o warning
The issue seems to be caused by this bit of code:
dataclasses-jsonschema/dataclasses_jsonschema/__init__.py
Line 887 in 82ea3d8
Setup
Python: v3.10
dataclasses_jsonschema: version 2.14.1 (but tried with the latest version as well.
The text was updated successfully, but these errors were encountered: