Example:
echo "{\"petName\": \"Lady\"}" | datamodel-codegen \
--disable-timestamp \
--field-constraints \
--snake-case-field \
--input-file-type json \
--target-python-version 3.8 \
--class-name Pet
````
Output:
```python
# generated by datamodel-codegen:
# filename: <stdin>
from __future__ import annotations
from pydantic import BaseModel
class Pet(BaseModel):
pet_name: str = Field(..., alias='petName')
The output should be:
# <...>
from pydantic import BaseModel, Field
# <...>
Version:
@CarlosDomingues
Thank you for creating this issue.
I have released a fixed version as 0.6.25 馃殌
@koxudaxi thanks a lot for the quick response. I've updated datamodel-code-generator to the latest version (0.6.26) and now this issue seems to be solved. I believe we can close this issue.
Most helpful comment
@koxudaxi thanks a lot for the quick response. I've updated
datamodel-code-generatorto the latest version (0.6.26) and now this issue seems to be solved. I believe we can close this issue.