fastapi-jwt-auth icon indicating copy to clipboard operation
fastapi-jwt-auth copied to clipboard

FIX to Pydantic 2

Open abercromb opened this issue 1 year ago • 2 comments

abercromb avatar Aug 15 '23 08:08 abercromb

I would not recomend to remove each_item=True parameter from validators. Just import Set and replace Sequence with Set:

-from typing import Optional, Union, Sequence, List
+from typing import Optional, Union, Sequence, List, Set
...
-     authjwt_token_location: Optional[Sequence[StrictStr]] = {'headers'}
+     authjwt_token_location: Optional[Set[StrictStr]] = {'headers'}
...
...

yudytskiy avatar Oct 09 '23 14:10 yudytskiy

Hi @IndominusByte could you please consider those changes? Thank you

ugolbck avatar Feb 20 '24 13:02 ugolbck