PydanticUserError: unique_items removed use Set instead #1527
-
I currently create from a OpenApi Specification, the Python Models. To do this, I use the datamodel-codegen Tool. Now the problem is on start up of the final application which uses the generated models, a PydanticError is raised.
This is the command I used to generate the model, with some warning messages:
After I got notice of the The question is therefore, why does the tool add the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Finally, I found the switch which is required to generate the proper Code for the target environment. |
Beta Was this translation helpful? Give feedback.
Finally, I found the switch which is required to generate the proper Code for the target environment.
I had to add
--output-model-type pydantic_v2.BaseModel