koxudaxi / datamodel-code-generator

Pydantic model and dataclasses.dataclass generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources.
https://koxudaxi.github.io/datamodel-code-generator/
MIT License
2.44k stars 281 forks source link

When generating pydantic with jsonData, an error occurred: "Invalid file format" #1993

Open zhao004 opened 4 weeks ago

zhao004 commented 4 weeks ago

Describe the bug When generating pydantic with jsonData, an error occurred: "Invalid file format"

To Reproduce

Example schema:

Used commandline:

$ datamodel-codegen  --input douyin.json --input-file-type json --output model.py

Expected behavior Invalid file format

Version:

Additional context

errroimage