diff --git a/README.md b/README.md index 6eacc7c4..afcc8622 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,7 @@ OPTIONS: --optional-nullable-parameters Generate nullable parameters as optional parameters --trim-unused-schema Removes unreferenced components schema to keep the generated output to a minimum --keep-schema Force to keep matching schema, uses regular expressions. Use together with "--trim-unused-schema". Can be set multiple times + --include-inheritance-hierarchy Keep all possible inherited types/union types even if they are not directly used --no-banner Don't show donation banner --skip-default-additional-properties Set to true to skip default additional properties --operation-name-generator Default The NSwag IOperationNameGenerator implementation to use. @@ -211,6 +212,7 @@ The following is an example `.refitter` file "^Model$", "^Person.+" ], + "includeInheritanceHierarchy": false, // Optional. Default=false. Set to true to keep all possible type-instances of inheritance/union types. This works in conjunction with trimUnusedSchema. "generateDefaultAdditionalProperties": true, // Optional. default=true "operationNameGenerator": "Default", // Optional. May be one of Default, MultipleClientsFromOperationId, MultipleClientsFromPathSegments, MultipleClientsFromFirstTagAndOperationId, MultipleClientsFromFirstTagAndOperationName, MultipleClientsFromFirstTagAndPathSegments, SingleClientFromOperationId, SingleClientFromPathSegments "immutableRecords": false, @@ -303,6 +305,7 @@ The following is an example `.refitter` file - `optionalParameters` - Generate non-required parameters as nullable optional parameters - `trimUnusedSchema` - Removes unreferenced components schema to keep the generated output to a minimum - `keepSchemaPatterns`: A collection of regular expressions to force to keep matching schema. This is used together with `trimUnusedSchema` +- `includeInheritanceHierarchy`: Set to true to keep all possible type-instances of inheritance/union types. If this is false only directly referenced types will be kept. This works in conjunction with `trimUnusedSchema` - `generateDefaultAdditionalProperties`: Set to `false` to skip default additional properties. Default is `true` - `operationNameGenerator`: The NSwag `IOperationNameGenerator` implementation to use. See https://refitter.github.io/api/Refitter.Core.OperationNameGeneratorTypes.html - `immutableRecords`: Set to `true` to generate contracts as immutable records instead of classes. Default is `false` diff --git a/docs/docfx_project/articles/cli-tool.md b/docs/docfx_project/articles/cli-tool.md index 8b667081..81d2713b 100644 --- a/docs/docfx_project/articles/cli-tool.md +++ b/docs/docfx_project/articles/cli-tool.md @@ -79,6 +79,7 @@ OPTIONS: --optional-nullable-parameters Generate nullable parameters as optional parameters --trim-unused-schema Removes unreferenced components schema to keep the generated output to a minimum --keep-schema Force to keep matching schema, uses regular expressions. Use together with "--trim-unused-schema". Can be set multiple times + --include-inheritance-hierarchy Keep all possible inherited types/union types even if they are not directly used --no-banner Don't show donation banner --skip-default-additional-properties Set to true to skip default additional properties --operation-name-generator Default The NSwag IOperationNameGenerator implementation to use. diff --git a/docs/docfx_project/articles/refitter-file-format.md b/docs/docfx_project/articles/refitter-file-format.md index 193950b1..d3a5ec1c 100644 --- a/docs/docfx_project/articles/refitter-file-format.md +++ b/docs/docfx_project/articles/refitter-file-format.md @@ -151,6 +151,7 @@ The following is an example `.refitter` file - `optionalParameters` - Generate non-required parameters as nullable optional parameters - `trimUnusedSchema` - Removes unreferenced components schema to keep the generated output to a minimum - `keepSchemaPatterns`: A collection of regular expressions to force to keep matching schema. This is used together with `trimUnusedSchema` +- `includeInheritanceHierarchy`: Set to true to keep all possible type-instances of inheritance/union types. If this is false only directly referenced types will be kept. This works in conjunction with `trimUnusedSchema` - `generateDefaultAdditionalProperties`: Set to `false` to skip default additional properties. Default is `true` - `operationNameGenerator`: The NSwag `IOperationNameGenerator` implementation to use. See https://refitter.github.io/api/Refitter.Core.OperationNameGeneratorTypes.html - `immutableRecords`: Set to `true` to generate contracts as immutable records instead of classes. Default is `false` diff --git a/src/Refitter/README.md b/src/Refitter/README.md index 7e9fcbb5..2295094f 100644 --- a/src/Refitter/README.md +++ b/src/Refitter/README.md @@ -82,6 +82,7 @@ OPTIONS: --optional-nullable-parameters Generate nullable parameters as optional parameters --trim-unused-schema Removes unreferenced components schema to keep the generated output to a minimum --keep-schema Force to keep matching schema, uses regular expressions. Use together with "--trim-unused-schema". Can be set multiple times + --include-inheritance-hierarchy Keep all possible inherited types/union types even if they are not directly used --no-banner Don't show donation banner --skip-default-additional-properties Set to true to skip default additional properties --operation-name-generator Default The NSwag IOperationNameGenerator implementation to use.