ghazi-git / drf-standardized-errors

Standardize your DRF API error responses
https://drf-standardized-errors.readthedocs.io/en/latest/
MIT License
251 stars 15 forks source link

fix: rollback type issue #45

Closed GabDug closed 1 year ago

GabDug commented 1 year ago

34 introduced a regression, where I would get a yaml.representer.RepresenterError: ('cannot represent an object', ClientErrorEnum.CLIENT_ERROR), when generating the schema.

I rollbacked the removal of the .value: here mypy is wrong. Mypy can be corrected with djang-stubs, but installing it brings other mypy warnings.

If you want some help to improve the typing or other things, I'd be willing to help :)

I hope you'll be able to make a new release soon

codecov[bot] commented 1 year ago

Codecov Report

All modified lines are covered by tests :white_check_mark:

:exclamation: No coverage uploaded for pull request base (main@417bf5d). Click here to learn what that means.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #45 +/- ## ======================================= Coverage ? 99.48% ======================================= Files ? 10 Lines ? 775 Branches ? 146 ======================================= Hits ? 771 Misses ? 1 Partials ? 3 ``` | [Files](https://app.codecov.io/gh/ghazi-git/drf-standardized-errors/pull/45?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [drf\_standardized\_errors/openapi.py](https://app.codecov.io/gh/ghazi-git/drf-standardized-errors/pull/45?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-ZHJmX3N0YW5kYXJkaXplZF9lcnJvcnMvb3BlbmFwaS5weQ==) | `100.00% <100.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ghazi-git commented 1 year ago

Thank you for the fix and sorry for the late response.

About creating a release, I'll do so shortly after both python 3.12 and drf 3.15 are released (hopefully next week or the week after)