Is your feature request related to a problem? Please describe.
When using this (awesome) tool, one of the issues we have is tracking exactly what options were used when the model file was generated, in our project we manually paste in the full command we used in the comment header of the generated file. Currently the default is:
# generated by datamodel-codegen:
# filename: project_api.yaml
# timestamp: 2024-01-23T15:54:04+00:00
to which we add the full command, so something like:
# generated by datamodel-codegen:
# filename: project_api.yaml
# timestamp: 2024-01-23T15:54:04+00:00
# command: datamodel-codegen --input project_api.yaml --output ../project/model.py --snake-case-field --base-class project.our_model.OurBase --output-model-type pydantic_v2.BaseModel
Describe the solution you'd like
To have either the full command, or a list of used options and values included in the header so the command can be recreated at a later date.
Describe alternatives you've considered
Current workaround is to manually paste it. We could write a wrapper script, but it seems like more people than us would be interested in this?
Additional context
Happy to turn this into a draft PR for discussion, but wanted to check if this functionality is available in the project already (I couldn't see it) and if it would be welcome or not.
Thank you!
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too