mirror of
https://github.com/koxudaxi/datamodel-code-generator.git
synced 2024-03-18 14:54:37 +03:00
Add collapse root model feature (#933)
* Add collapse root model feature * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Remove unused root type model * Update unittest * ignore coverage * copy field arguments * Update documents Co-authored-by: ferris <ferris@devdroplets.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Koudai Aono <koxudaxi@gmail.com>
This commit is contained in:
@@ -56,7 +56,7 @@ usage: datamodel-codegen [-h] [--input INPUT] [--url URL]
|
||||
[--disable-timestamp] [--use-standard-collections]
|
||||
[--use-generic-container-types]
|
||||
[--use-schema-description] [--use-field-description] [--reuse-model]
|
||||
[--enum-field-as-literal {all,one}]
|
||||
[--collapse-root-models] [--enum-field-as-literal {all,one}]
|
||||
[--set-default-enum-member]
|
||||
[--empty-enum-field-name EMPTY_ENUM_FIELD_NAME]
|
||||
[--special-field-name-prefix SPECIAL_FIELD_NAME_PREFIX]
|
||||
@@ -131,6 +131,9 @@ optional arguments:
|
||||
Use schema description to populate field docstring
|
||||
--reuse-model Re-use models on the field when a module has the model
|
||||
with the same content
|
||||
--collapse-root-models
|
||||
Models generated with a root-type field will be
|
||||
merged into the models using that root-type model
|
||||
--enum-field-as-literal {all,one}
|
||||
Parse enum field as literal. all: all enum field type
|
||||
are Literal. one: field type is Literal when an enum
|
||||
|
||||
Reference in New Issue
Block a user