support pydantic v2
Hi! great to see this useful tool!
Cross posting from FastAPI discussions :wink:
I just tried it, but unfortunately it doesn't work with pydantic v2.
It crashes because it can't find pydantic.fields.ModelField, that is removed in facor of a cls.model_fields, which is a dict[str, FieldInfo].
Obviously there will be other error, but I couldn't find the time to investigate it further.
The work is almost finished, but when I checked the tests from V1 to V2, I found a problem with the incorrect parsing of Optional[list[...]], Optional[set[...]] and other types for FORM , because of which I had to spend time and make a PR in FastAPI.
But need to wait for it - https://github.com/tiangolo/fastapi/pull/9925 & https://github.com/tiangolo/fastapi/pull/9928
Hello @dotX12. Could you please post the current version with pydantic v2?
I made a fork with support for version 2 - https://github.com/AezaGroup/pyfa-converter-v2