Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description param in Request dataclass is not always as declared #21

Open
gha88 opened this issue Dec 21, 2023 · 0 comments
Open

Description param in Request dataclass is not always as declared #21

gha88 opened this issue Dec 21, 2023 · 0 comments

Comments

@gha88
Copy link
Contributor

gha88 commented Dec 21, 2023

In method parse, defined in request.py, when looking for the description attribute it can be left as a string even if declared as Description.

description = data.get("description") if isinstance(description, dict): description = Description.parse(description)

I can see two possible solution:

  • declare in Request objcet the attribute description as Union[Description|str]
  • convert the string only parameter to a Description object anyway
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant