/NSwag.Commands_Help.txt Secret
Last active
May 24, 2021 13:49
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSwag command line tool for .NET Core Net50, toolchain v13.11.1.0 (NJsonSchema v10.4.3.0 (Newtonsoft.Json v12.0.0.0)) | |
Visit http://NSwag.org for more information. | |
NSwag bin directory: C:\Users\wakau\.dotnet\tools\.store\nswag.consolecore\13.11.1\nswag.consolecore\13.11.1\tools\net5.0\any | |
Usage: | |
myapp.exe myCommand /myParameter:myValue /mySecondParameter:myValue | |
Commands: | |
version | |
list-types | |
list-controllers | |
types2openapi | |
types2swagger | |
webapi2openapi | |
webapi2swagger | |
aspnetcore2openapi | |
aspnetcore2swagger | |
new | |
run | |
jsonschema2csclient | |
jsonschema2tsclient | |
openapi2csclient | |
swagger2csclient | |
openapi2cscontroller | |
swagger2cscontroller | |
openapi2tsclient | |
swagger2tsclient | |
Command: version | |
Prints the toolchain version. | |
Arguments: | |
Command: list-types | |
List all types for the given assembly and settings. | |
Arguments: | |
File | |
The nswag.json configuration file path. | |
Variables | |
Assembly | |
The path or paths to the .NET assemblies (comma separated). | |
AssemblyConfig | |
The path to the assembly App.config or Web.config (optional). | |
ReferencePaths | |
The paths to search for referenced assembly files (comma separated). | |
UseNuGetCache | |
Determines if local Nuget's cache folder should be put in the ReferencePaths by default | |
Command: list-controllers | |
List all controllers classes for the given assembly and settings. | |
Arguments: | |
File | |
The nswag.json configuration file path. | |
Variables | |
Assembly | |
The path or paths to the .NET assemblies (comma separated). | |
AssemblyConfig | |
The path to the assembly App.config or Web.config (optional). | |
ReferencePaths | |
The paths to search for referenced assembly files (comma separated). | |
UseNuGetCache | |
Determines if local Nuget's cache folder should be put in the ReferencePaths by default | |
Command: types2openapi | |
Arguments: | |
ClassNames | |
The class names. | |
DefaultPropertyNameHandling | |
The default property name handling ('Default' or 'CamelCase'). | |
DefaultReferenceTypeNullHandling | |
The default reference type null handling (Null (default) or NotNull). | |
DefaultDictionaryValueReferenceTypeNullHandling | |
The default reference type null handling of dictionary value types (NotNull (default) or Null). | |
DefaultEnumHandling | |
The default enum handling ('String' or 'Integer'), default: Integer. | |
FlattenInheritanceHierarchy | |
Flatten the inheritance hierarchy instead of using allOf to describe inheritance (default: false). | |
IgnoreObsoleteProperties | |
Ignore properties with the ObsoleteAttribute (default: false). | |
AllowReferencesWithProperties | |
Use $ref references even if additional properties are defined on the object (otherwise allOf/oneOf with $ref is used, default: false). | |
GenerateKnownTypes | |
Generate schemas for types in KnownTypeAttribute attributes (default: true). | |
GenerateXmlObjects | |
Generate xmlObject representation for definitions (default: false). | |
Output | |
The output file path (optional). | |
OutputType | |
Specifies the output schema type, ignored when UseDocumentProvider is enabled (Swagger2|OpenApi3, default: Swagger2). | |
NewLineBehavior | |
The new line behavior (Auto (OS default), CRLF, LF). | |
Assembly | |
The path or paths to the .NET assemblies (comma separated). | |
AssemblyConfig | |
The path to the assembly App.config or Web.config (optional). | |
ReferencePaths | |
The paths to search for referenced assembly files (comma separated). | |
UseNuGetCache | |
Determines if local Nuget's cache folder should be put in the ReferencePaths by default | |
Command: types2swagger | |
Arguments: | |
ClassNames | |
The class names. | |
DefaultPropertyNameHandling | |
The default property name handling ('Default' or 'CamelCase'). | |
DefaultReferenceTypeNullHandling | |
The default reference type null handling (Null (default) or NotNull). | |
DefaultDictionaryValueReferenceTypeNullHandling | |
The default reference type null handling of dictionary value types (NotNull (default) or Null). | |
DefaultEnumHandling | |
The default enum handling ('String' or 'Integer'), default: Integer. | |
FlattenInheritanceHierarchy | |
Flatten the inheritance hierarchy instead of using allOf to describe inheritance (default: false). | |
IgnoreObsoleteProperties | |
Ignore properties with the ObsoleteAttribute (default: false). | |
AllowReferencesWithProperties | |
Use $ref references even if additional properties are defined on the object (otherwise allOf/oneOf with $ref is used, default: false). | |
GenerateKnownTypes | |
Generate schemas for types in KnownTypeAttribute attributes (default: true). | |
GenerateXmlObjects | |
Generate xmlObject representation for definitions (default: false). | |
Output | |
The output file path (optional). | |
OutputType | |
Specifies the output schema type, ignored when UseDocumentProvider is enabled (Swagger2|OpenApi3, default: Swagger2). | |
NewLineBehavior | |
The new line behavior (Auto (OS default), CRLF, LF). | |
Assembly | |
The path or paths to the .NET assemblies (comma separated). | |
AssemblyConfig | |
The path to the assembly App.config or Web.config (optional). | |
ReferencePaths | |
The paths to search for referenced assembly files (comma separated). | |
UseNuGetCache | |
Determines if local Nuget's cache folder should be put in the ReferencePaths by default | |
Command: webapi2openapi | |
Generates a Swagger/OpenAPI specification for a controller or controllers contained in a .NET Web API assembly. | |
Arguments: | |
Controller | |
The Web API controller full class name or empty to load all controllers from the assembly. | |
Controllers | |
The Web API controller full class names or empty to load all controllers from the assembly (comma separated). | |
AspNetCore | |
Specifies whether the controllers are hosted by ASP.NET Core. | |
ResolveJsonOptions | |
Specifies whether to resolve MvcJsonOptions to infer serializer settings (recommended, default: false, only available when IsAspNetCore is set). | |
DefaultUrlTemplate | |
The Web API default URL template (default for Web API: 'api/{controller}/{id}'; for MVC projects: '{controller}/{action}/{id?}'). | |
AddMissingPathParameters | |
Specifies whether to add path parameters which are missing in the action method (default: true). | |
IncludedVersions | |
The included API versions used by the ApiVersionProcessor (comma separated, default: empty = all). | |
DefaultPropertyNameHandling | |
The default property name handling ('Default' or 'CamelCase'). | |
DefaultReferenceTypeNullHandling | |
The default reference type null handling (Null (default) or NotNull). | |
DefaultDictionaryValueReferenceTypeNullHandling | |
The default reference type null handling of dictionary value types (NotNull (default) or Null). | |
DefaultResponseReferenceTypeNullHandling | |
The default response reference type null handling (default: NotNull (default) or Null). | |
DefaultEnumHandling | |
The default enum handling ('String' or 'Integer'), default: Integer. | |
FlattenInheritanceHierarchy | |
Flatten the inheritance hierarchy instead of using allOf to describe inheritance (default: false). | |
GenerateKnownTypes | |
Generate schemas for types in KnownTypeAttribute attributes (default: true). | |
GenerateEnumMappingDescription | |
Generate a description with number to enum name mappings (for integer enums only, default: false). | |
GenerateXmlObjects | |
Generate xmlObject representation for definitions (default: false). | |
GenerateAbstractProperties | |
Generate abstract properties (i.e. interface and abstract properties. Properties may defined multiple times in a inheritance hierarchy, default: false). | |
GenerateAbstractSchemas | |
Generate the x-abstract flag on schemas (default: true). | |
IgnoreObsoleteProperties | |
Ignore properties with the ObsoleteAttribute (default: false). | |
AllowReferencesWithProperties | |
Use $ref references even if additional properties are defined on the object (otherwise allOf/oneOf with $ref is used, default: false). | |
ExcludedTypeNames | |
The excluded type names (same as JsonSchemaIgnoreAttribute). | |
ServiceHost | |
Overrides the service host of the web service (optional, use '.' to remove the hostname). | |
ServiceBasePath | |
The basePath of the Swagger specification (optional). | |
ServiceSchemes | |
Overrides the allowed schemes of the web service (optional, comma separated, 'http', 'https', 'ws', 'wss'). | |
InfoTitle | |
Specify the title of the Swagger specification (ignored when DocumentTemplate is set). | |
InfoDescription | |
Specify the description of the Swagger specification (ignored when DocumentTemplate is set). | |
InfoVersion | |
Specify the version of the Swagger specification (default: 1.0.0, ignored when DocumentTemplate is set). | |
DocumentTemplate | |
Specifies the Swagger document template (may be a path or JSON, default: none). | |
DocumentProcessors | |
The document processor type names in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
OperationProcessors | |
The operation processor type names in the form 'assemblyName:fullTypeName' or 'fullTypeName' or ':assemblyName:fullTypeName' or ':fullTypeName'. Begin name with ':' to prepend processors (required when used to filter out other operations). | |
TypeNameGenerator | |
The custom ITypeNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
SchemaNameGenerator | |
The custom ISchemaNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
ContractResolver | |
DEPRECATED: The custom IContractResolver implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
SerializerSettings | |
The custom JsonSerializerSettings implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
UseDocumentProvider | |
Generate document using SwaggerDocumentProvider (configuration from AddOpenApiDocument()/AddSwaggerDocument(), most CLI settings will be ignored). | |
DocumentName | |
The document name to use in SwaggerDocumentProvider (default: v1). | |
AspNetCoreEnvironment | |
Sets the ASPNETCORE_ENVIRONMENT if provided (default: empty). | |
CreateWebHostBuilderMethod | |
The CreateWebHostBuilder method in the form 'assemblyName:fullTypeName.methodName' or 'fullTypeName.methodName'. | |
Startup | |
The Startup class type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
AllowNullableBodyParameters | |
Nullable body parameters are allowed (ignored when MvcOptions.AllowEmptyInputInBodyModelBinding is available (ASP.NET Core 2.0+), default: true). | |
Output | |
The output file path (optional). | |
OutputType | |
Specifies the output schema type, ignored when UseDocumentProvider is enabled (Swagger2|OpenApi3, default: Swagger2). | |
NewLineBehavior | |
The new line behavior (Auto (OS default), CRLF, LF). | |
Assembly | |
The path or paths to the .NET assemblies (comma separated). | |
AssemblyConfig | |
The path to the assembly App.config or Web.config (optional). | |
ReferencePaths | |
The paths to search for referenced assembly files (comma separated). | |
UseNuGetCache | |
Determines if local Nuget's cache folder should be put in the ReferencePaths by default | |
Command: webapi2swagger | |
Generates a Swagger/OpenAPI specification for a controller or controllers contained in a .NET Web API assembly (obsolete: use webapi2openapi instead). | |
Arguments: | |
Controller | |
The Web API controller full class name or empty to load all controllers from the assembly. | |
Controllers | |
The Web API controller full class names or empty to load all controllers from the assembly (comma separated). | |
AspNetCore | |
Specifies whether the controllers are hosted by ASP.NET Core. | |
ResolveJsonOptions | |
Specifies whether to resolve MvcJsonOptions to infer serializer settings (recommended, default: false, only available when IsAspNetCore is set). | |
DefaultUrlTemplate | |
The Web API default URL template (default for Web API: 'api/{controller}/{id}'; for MVC projects: '{controller}/{action}/{id?}'). | |
AddMissingPathParameters | |
Specifies whether to add path parameters which are missing in the action method (default: true). | |
IncludedVersions | |
The included API versions used by the ApiVersionProcessor (comma separated, default: empty = all). | |
DefaultPropertyNameHandling | |
The default property name handling ('Default' or 'CamelCase'). | |
DefaultReferenceTypeNullHandling | |
The default reference type null handling (Null (default) or NotNull). | |
DefaultDictionaryValueReferenceTypeNullHandling | |
The default reference type null handling of dictionary value types (NotNull (default) or Null). | |
DefaultResponseReferenceTypeNullHandling | |
The default response reference type null handling (default: NotNull (default) or Null). | |
DefaultEnumHandling | |
The default enum handling ('String' or 'Integer'), default: Integer. | |
FlattenInheritanceHierarchy | |
Flatten the inheritance hierarchy instead of using allOf to describe inheritance (default: false). | |
GenerateKnownTypes | |
Generate schemas for types in KnownTypeAttribute attributes (default: true). | |
GenerateEnumMappingDescription | |
Generate a description with number to enum name mappings (for integer enums only, default: false). | |
GenerateXmlObjects | |
Generate xmlObject representation for definitions (default: false). | |
GenerateAbstractProperties | |
Generate abstract properties (i.e. interface and abstract properties. Properties may defined multiple times in a inheritance hierarchy, default: false). | |
GenerateAbstractSchemas | |
Generate the x-abstract flag on schemas (default: true). | |
IgnoreObsoleteProperties | |
Ignore properties with the ObsoleteAttribute (default: false). | |
AllowReferencesWithProperties | |
Use $ref references even if additional properties are defined on the object (otherwise allOf/oneOf with $ref is used, default: false). | |
ExcludedTypeNames | |
The excluded type names (same as JsonSchemaIgnoreAttribute). | |
ServiceHost | |
Overrides the service host of the web service (optional, use '.' to remove the hostname). | |
ServiceBasePath | |
The basePath of the Swagger specification (optional). | |
ServiceSchemes | |
Overrides the allowed schemes of the web service (optional, comma separated, 'http', 'https', 'ws', 'wss'). | |
InfoTitle | |
Specify the title of the Swagger specification (ignored when DocumentTemplate is set). | |
InfoDescription | |
Specify the description of the Swagger specification (ignored when DocumentTemplate is set). | |
InfoVersion | |
Specify the version of the Swagger specification (default: 1.0.0, ignored when DocumentTemplate is set). | |
DocumentTemplate | |
Specifies the Swagger document template (may be a path or JSON, default: none). | |
DocumentProcessors | |
The document processor type names in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
OperationProcessors | |
The operation processor type names in the form 'assemblyName:fullTypeName' or 'fullTypeName' or ':assemblyName:fullTypeName' or ':fullTypeName'. Begin name with ':' to prepend processors (required when used to filter out other operations). | |
TypeNameGenerator | |
The custom ITypeNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
SchemaNameGenerator | |
The custom ISchemaNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
ContractResolver | |
DEPRECATED: The custom IContractResolver implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
SerializerSettings | |
The custom JsonSerializerSettings implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
UseDocumentProvider | |
Generate document using SwaggerDocumentProvider (configuration from AddOpenApiDocument()/AddSwaggerDocument(), most CLI settings will be ignored). | |
DocumentName | |
The document name to use in SwaggerDocumentProvider (default: v1). | |
AspNetCoreEnvironment | |
Sets the ASPNETCORE_ENVIRONMENT if provided (default: empty). | |
CreateWebHostBuilderMethod | |
The CreateWebHostBuilder method in the form 'assemblyName:fullTypeName.methodName' or 'fullTypeName.methodName'. | |
Startup | |
The Startup class type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
AllowNullableBodyParameters | |
Nullable body parameters are allowed (ignored when MvcOptions.AllowEmptyInputInBodyModelBinding is available (ASP.NET Core 2.0+), default: true). | |
Output | |
The output file path (optional). | |
OutputType | |
Specifies the output schema type, ignored when UseDocumentProvider is enabled (Swagger2|OpenApi3, default: Swagger2). | |
NewLineBehavior | |
The new line behavior (Auto (OS default), CRLF, LF). | |
Assembly | |
The path or paths to the .NET assemblies (comma separated). | |
AssemblyConfig | |
The path to the assembly App.config or Web.config (optional). | |
ReferencePaths | |
The paths to search for referenced assembly files (comma separated). | |
UseNuGetCache | |
Determines if local Nuget's cache folder should be put in the ReferencePaths by default | |
Command: aspnetcore2openapi | |
Generates a Swagger specification ASP.NET Core Mvc application using ApiExplorer. | |
Arguments: | |
Project | |
The project to use. | |
MSBuildProjectExtensionsPath | |
The MSBuild project extensions path. Defaults to "obj". | |
Configuration | |
The configuration to use. | |
Runtime | |
The runtime to use. | |
TargetFramework | |
The target framework to use. | |
NoBuild | |
Don't build the project. Only use this when the build is up-to-date. | |
MSBuildOutputPath | |
The MSBuild output path | |
Verbose | |
Print verbose output. | |
WorkingDirectory | |
The working directory to use. | |
RequireParametersWithoutDefault | |
Parameters without default value are always required(i.e. api explorer info and only optional when default is set, legacy, default: false). | |
ApiGroupNames | |
The ASP.NET Core API Explorer group names to include (comma separated, default: empty = all). | |
DefaultPropertyNameHandling | |
The default property name handling ('Default' or 'CamelCase'). | |
DefaultReferenceTypeNullHandling | |
The default reference type null handling (Null (default) or NotNull). | |
DefaultDictionaryValueReferenceTypeNullHandling | |
The default reference type null handling of dictionary value types (NotNull (default) or Null). | |
DefaultResponseReferenceTypeNullHandling | |
The default response reference type null handling (default: NotNull (default) or Null). | |
DefaultEnumHandling | |
The default enum handling ('String' or 'Integer'), default: Integer. | |
FlattenInheritanceHierarchy | |
Flatten the inheritance hierarchy instead of using allOf to describe inheritance (default: false). | |
GenerateKnownTypes | |
Generate schemas for types in KnownTypeAttribute attributes (default: true). | |
GenerateEnumMappingDescription | |
Generate a description with number to enum name mappings (for integer enums only, default: false). | |
GenerateXmlObjects | |
Generate xmlObject representation for definitions (default: false). | |
GenerateAbstractProperties | |
Generate abstract properties (i.e. interface and abstract properties. Properties may defined multiple times in a inheritance hierarchy, default: false). | |
GenerateAbstractSchemas | |
Generate the x-abstract flag on schemas (default: true). | |
IgnoreObsoleteProperties | |
Ignore properties with the ObsoleteAttribute (default: false). | |
AllowReferencesWithProperties | |
Use $ref references even if additional properties are defined on the object (otherwise allOf/oneOf with $ref is used, default: false). | |
ExcludedTypeNames | |
The excluded type names (same as JsonSchemaIgnoreAttribute). | |
ServiceHost | |
Overrides the service host of the web service (optional, use '.' to remove the hostname). | |
ServiceBasePath | |
The basePath of the Swagger specification (optional). | |
ServiceSchemes | |
Overrides the allowed schemes of the web service (optional, comma separated, 'http', 'https', 'ws', 'wss'). | |
InfoTitle | |
Specify the title of the Swagger specification (ignored when DocumentTemplate is set). | |
InfoDescription | |
Specify the description of the Swagger specification (ignored when DocumentTemplate is set). | |
InfoVersion | |
Specify the version of the Swagger specification (default: 1.0.0, ignored when DocumentTemplate is set). | |
DocumentTemplate | |
Specifies the Swagger document template (may be a path or JSON, default: none). | |
DocumentProcessors | |
The document processor type names in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
OperationProcessors | |
The operation processor type names in the form 'assemblyName:fullTypeName' or 'fullTypeName' or ':assemblyName:fullTypeName' or ':fullTypeName'. Begin name with ':' to prepend processors (required when used to filter out other operations). | |
TypeNameGenerator | |
The custom ITypeNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
SchemaNameGenerator | |
The custom ISchemaNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
ContractResolver | |
DEPRECATED: The custom IContractResolver implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
SerializerSettings | |
The custom JsonSerializerSettings implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
UseDocumentProvider | |
Generate document using SwaggerDocumentProvider (configuration from AddOpenApiDocument()/AddSwaggerDocument(), most CLI settings will be ignored). | |
DocumentName | |
The document name to use in SwaggerDocumentProvider (default: v1). | |
AspNetCoreEnvironment | |
Sets the ASPNETCORE_ENVIRONMENT if provided (default: empty). | |
CreateWebHostBuilderMethod | |
The CreateWebHostBuilder method in the form 'assemblyName:fullTypeName.methodName' or 'fullTypeName.methodName'. | |
Startup | |
The Startup class type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
AllowNullableBodyParameters | |
Nullable body parameters are allowed (ignored when MvcOptions.AllowEmptyInputInBodyModelBinding is available (ASP.NET Core 2.0+), default: true). | |
Output | |
The output file path (optional). | |
OutputType | |
Specifies the output schema type, ignored when UseDocumentProvider is enabled (Swagger2|OpenApi3, default: Swagger2). | |
NewLineBehavior | |
The new line behavior (Auto (OS default), CRLF, LF). | |
Assembly | |
The path or paths to the .NET assemblies (comma separated). | |
AssemblyConfig | |
The path to the assembly App.config or Web.config (optional). | |
ReferencePaths | |
The paths to search for referenced assembly files (comma separated). | |
UseNuGetCache | |
Determines if local Nuget's cache folder should be put in the ReferencePaths by default | |
Command: aspnetcore2swagger | |
Generates a Swagger specification ASP.NET Core Mvc application using ApiExplorer (obsolete: use aspnetcore2openapi instead). | |
Arguments: | |
Project | |
The project to use. | |
MSBuildProjectExtensionsPath | |
The MSBuild project extensions path. Defaults to "obj". | |
Configuration | |
The configuration to use. | |
Runtime | |
The runtime to use. | |
TargetFramework | |
The target framework to use. | |
NoBuild | |
Don't build the project. Only use this when the build is up-to-date. | |
MSBuildOutputPath | |
The MSBuild output path | |
Verbose | |
Print verbose output. | |
WorkingDirectory | |
The working directory to use. | |
RequireParametersWithoutDefault | |
Parameters without default value are always required(i.e. api explorer info and only optional when default is set, legacy, default: false). | |
ApiGroupNames | |
The ASP.NET Core API Explorer group names to include (comma separated, default: empty = all). | |
DefaultPropertyNameHandling | |
The default property name handling ('Default' or 'CamelCase'). | |
DefaultReferenceTypeNullHandling | |
The default reference type null handling (Null (default) or NotNull). | |
DefaultDictionaryValueReferenceTypeNullHandling | |
The default reference type null handling of dictionary value types (NotNull (default) or Null). | |
DefaultResponseReferenceTypeNullHandling | |
The default response reference type null handling (default: NotNull (default) or Null). | |
DefaultEnumHandling | |
The default enum handling ('String' or 'Integer'), default: Integer. | |
FlattenInheritanceHierarchy | |
Flatten the inheritance hierarchy instead of using allOf to describe inheritance (default: false). | |
GenerateKnownTypes | |
Generate schemas for types in KnownTypeAttribute attributes (default: true). | |
GenerateEnumMappingDescription | |
Generate a description with number to enum name mappings (for integer enums only, default: false). | |
GenerateXmlObjects | |
Generate xmlObject representation for definitions (default: false). | |
GenerateAbstractProperties | |
Generate abstract properties (i.e. interface and abstract properties. Properties may defined multiple times in a inheritance hierarchy, default: false). | |
GenerateAbstractSchemas | |
Generate the x-abstract flag on schemas (default: true). | |
IgnoreObsoleteProperties | |
Ignore properties with the ObsoleteAttribute (default: false). | |
AllowReferencesWithProperties | |
Use $ref references even if additional properties are defined on the object (otherwise allOf/oneOf with $ref is used, default: false). | |
ExcludedTypeNames | |
The excluded type names (same as JsonSchemaIgnoreAttribute). | |
ServiceHost | |
Overrides the service host of the web service (optional, use '.' to remove the hostname). | |
ServiceBasePath | |
The basePath of the Swagger specification (optional). | |
ServiceSchemes | |
Overrides the allowed schemes of the web service (optional, comma separated, 'http', 'https', 'ws', 'wss'). | |
InfoTitle | |
Specify the title of the Swagger specification (ignored when DocumentTemplate is set). | |
InfoDescription | |
Specify the description of the Swagger specification (ignored when DocumentTemplate is set). | |
InfoVersion | |
Specify the version of the Swagger specification (default: 1.0.0, ignored when DocumentTemplate is set). | |
DocumentTemplate | |
Specifies the Swagger document template (may be a path or JSON, default: none). | |
DocumentProcessors | |
The document processor type names in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
OperationProcessors | |
The operation processor type names in the form 'assemblyName:fullTypeName' or 'fullTypeName' or ':assemblyName:fullTypeName' or ':fullTypeName'. Begin name with ':' to prepend processors (required when used to filter out other operations). | |
TypeNameGenerator | |
The custom ITypeNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
SchemaNameGenerator | |
The custom ISchemaNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
ContractResolver | |
DEPRECATED: The custom IContractResolver implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
SerializerSettings | |
The custom JsonSerializerSettings implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
UseDocumentProvider | |
Generate document using SwaggerDocumentProvider (configuration from AddOpenApiDocument()/AddSwaggerDocument(), most CLI settings will be ignored). | |
DocumentName | |
The document name to use in SwaggerDocumentProvider (default: v1). | |
AspNetCoreEnvironment | |
Sets the ASPNETCORE_ENVIRONMENT if provided (default: empty). | |
CreateWebHostBuilderMethod | |
The CreateWebHostBuilder method in the form 'assemblyName:fullTypeName.methodName' or 'fullTypeName.methodName'. | |
Startup | |
The Startup class type in the form 'assemblyName:fullTypeName' or 'fullTypeName'. | |
AllowNullableBodyParameters | |
Nullable body parameters are allowed (ignored when MvcOptions.AllowEmptyInputInBodyModelBinding is available (ASP.NET Core 2.0+), default: true). | |
Output | |
The output file path (optional). | |
OutputType | |
Specifies the output schema type, ignored when UseDocumentProvider is enabled (Swagger2|OpenApi3, default: Swagger2). | |
NewLineBehavior | |
The new line behavior (Auto (OS default), CRLF, LF). | |
Assembly | |
The path or paths to the .NET assemblies (comma separated). | |
AssemblyConfig | |
The path to the assembly App.config or Web.config (optional). | |
ReferencePaths | |
The paths to search for referenced assembly files (comma separated). | |
UseNuGetCache | |
Determines if local Nuget's cache folder should be put in the ReferencePaths by default | |
Command: new | |
Creates a new nswag.json file in the current directory. | |
Arguments: | |
Command: run | |
Executes an .nswag file. If 'input' is not specified then all *.nswag files and the nswag.json file is executed. | |
Arguments: | |
Variables | |
Command: jsonschema2csclient | |
Generates CSharp classes from a JSON Schema. | |
Arguments: | |
Name | |
The class name of the root schema. | |
Namespace | |
The namespace of the generated classes. | |
RequiredPropertiesMustBeDefined | |
Specifies whether a required property must be defined in JSON (sets Required.Always when the property is required). | |
DateType | |
The date .NET type (default: 'DateTimeOffset'). | |
JsonConverters | |
Specifies the custom Json.NET converter types (optional, comma separated). | |
AnyType | |
The any .NET type (default: 'object'). | |
DateTimeType | |
The date time .NET type (default: 'DateTimeOffset'). | |
TimeType | |
The time .NET type (default: 'TimeSpan'). | |
TimeSpanType | |
The time span .NET type (default: 'TimeSpan'). | |
ArrayType | |
The generic array .NET type (default: 'ICollection'). | |
ArrayInstanceType | |
The generic array .NET instance type (default: empty = ArrayType). | |
DictionaryType | |
The generic dictionary .NET type (default: 'IDictionary'). | |
DictionaryInstanceType | |
The generic dictionary .NET instance type (default: empty = DictionaryType). | |
ArrayBaseType | |
The generic array .NET type (default: 'Collection'). | |
DictionaryBaseType | |
The generic dictionary .NET type (default: 'Dictionary'). | |
ClassStyle | |
The CSharp class style, 'Poco' or 'Inpc' (default: 'Poco'). | |
JsonLibrary | |
The CSharp JSON library, 'NewtonsoftJson' or 'SystemTextJson' (default: 'NewtonsoftJson', 'SystemTextJson' is experimental). | |
GenerateDefaultValues | |
Specifies whether to generate default values for properties (may generate CSharp 6 code, default: true). | |
GenerateDataAnnotations | |
Specifies whether to generate data annotation attributes on DTO classes (default: true). | |
ExcludedTypeNames | |
The excluded DTO type names (must be defined in an import or other namespace). | |
HandleReferences | |
Use preserve references handling (All) in the JSON serializer (default: false). | |
GenerateImmutableArrayProperties | |
Specifies whether to remove the setter for non-nullable array properties (default: false). | |
GenerateImmutableDictionaryProperties | |
Specifies whether to remove the setter for non-nullable dictionary properties (default: false). | |
JsonSerializerSettingsTransformationMethod | |
The name of a static method which is called to transform the JsonSerializerSettings used in the generated ToJson()/FromJson() methods (default: none). | |
InlineNamedArrays | |
Inline named arrays (default: false). | |
InlineNamedDictionaries | |
Inline named dictionaries (default: false). | |
InlineNamedTuples | |
Inline named tuples (default: true). | |
InlineNamedAny | |
Inline named any types (default: false). | |
GenerateOptionalPropertiesAsNullable | |
Specifies whether optional schema properties (not required) are generated as nullable properties (default: false). | |
GenerateNullableReferenceTypes | |
Specifies whether whether to generate Nullable Reference Type annotations (default: false). | |
Input | |
A file path or URL to the data or the JSON data itself. | |
ServiceHost | |
Overrides the service host of the web document (optional, use '.' to remove the hostname). | |
ServiceSchemes | |
Overrides the allowed schemes of the web service (optional, comma separated, 'http', 'https', 'ws', 'wss'). | |
Output | |
The output file path (optional). | |
NewLineBehavior | |
The new line behavior (Auto (OS default), CRLF, LF). | |
Command: jsonschema2tsclient | |
Generates TypeScript interfaces from a JSON Schema. | |
Arguments: | |
Name | |
The type name of the root schema. | |
Input | |
A file path or URL to the data or the JSON data itself. | |
ServiceHost | |
Overrides the service host of the web document (optional, use '.' to remove the hostname). | |
ServiceSchemes | |
Overrides the allowed schemes of the web service (optional, comma separated, 'http', 'https', 'ws', 'wss'). | |
Output | |
The output file path (optional). | |
NewLineBehavior | |
The new line behavior (Auto (OS default), CRLF, LF). | |
Command: openapi2csclient | |
Generates CSharp client code from a Swagger/OpenAPI specification. | |
Arguments: | |
ClientBaseClass | |
The client base class (empty for no base class). | |
ConfigurationClass | |
The configuration class. The setting ClientBaseClass must be set. (empty for no configuration class). | |
GenerateClientClasses | |
Specifies whether generate client classes. | |
GenerateClientInterfaces | |
Specifies whether generate interfaces for the client classes. | |
ClientBaseInterface | |
Base interface for client interfaces (empty for no client base interface). | |
InjectHttpClient | |
Specifies whether an HttpClient instance is injected (default: true). | |
DisposeHttpClient | |
Specifies whether to dispose the HttpClient (injected HttpClient is never disposed). | |
ProtectedMethods | |
List of methods with a protected access modifier ('classname.methodname'). | |
GenerateExceptionClasses | |
Specifies whether to generate exception classes (default: true). | |
ExceptionClass | |
The exception class (default 'SwaggerException', may use '{controller}' placeholder). | |
WrapDtoExceptions | |
Specifies whether DTO exceptions are wrapped in a SwaggerException instance (default: true). | |
UseHttpClientCreationMethod | |
Specifies whether to call CreateHttpClientAsync on the base class to create a new HttpClient. | |
HttpClientType | |
Specifies the HttpClient type. By default the 'System.Net.Http.HttpClient' is used. | |
UseHttpRequestMessageCreationMethod | |
Specifies whether to call CreateHttpRequestMessageAsync on the base class to create a new HttpRequestMethod. | |
UseBaseUrl | |
Specifies whether to use and expose the base URL (default: true). | |
GenerateBaseUrlProperty | |
Specifies whether to generate the BaseUrl property, must be defined on the base class otherwise (default: true). | |
GenerateSyncMethods | |
Specifies whether to generate synchronous methods (not recommended, default: false). | |
GeneratePrepareRequestAndProcessResponseAsAsyncMethods | |
Specifies whether to generate PrepareRequest and ProcessResponse methods as asynchronous methods (if true, both must be defined in the base class or in the partial class, default: false). | |
ExposeJsonSerializerSettings | |
Specifies whether to expose the JsonSerializerSettings property (default: false). | |
ClientClassAccessModifier | |
The client class access modifier (default: public). | |
TypeAccessModifier | |
The DTO class/enum access modifier (default: public). | |
GenerateContractsOutput | |
Specifies whether to generate contracts output (interface and models in a separate file set with the ContractsOutput parameter). | |
ContractsNamespace | |
The contracts .NET namespace. | |
ContractsOutput | |
The contracts output file path (optional, if no path is set then a single file with the implementation and contracts is generated). | |
ParameterDateTimeFormat | |
Specifies the format for DateTime type method parameters (default: s). | |
ParameterDateFormat | |
Specifies the format for Date type method parameters (default: yyyy-MM-dd). | |
GenerateUpdateJsonSerializerSettingsMethod | |
Generate the UpdateJsonSerializerSettings method (must be implemented in the base class otherwise, default: true). | |
UseRequestAndResponseSerializationSettings | |
Generate different request and response serialization settings (default: false). | |
SerializeTypeInformation | |
Serialize the type information in a $type property (not recommended, also sets TypeNameHandling = Auto, default: true). | |
QueryNullValue | |
The null value used for query parameters which are null (default: ''). | |
ClassName | |
The class name of the generated client. | |
OperationGenerationMode | |
The operation generation mode ('SingleClientFromOperationId' or 'MultipleClientsFromPathSegments'). | |
AdditionalNamespaceUsages | |
The additional namespace usages. | |
AdditionalContractNamespaceUsages | |
The additional contract namespace usages. | |
GenerateOptionalParameters | |
Specifies whether to reorder parameters (required first, optional at the end) and generate optional parameters (default: false). | |
GenerateJsonMethods | |
Specifies whether to render ToJson() and FromJson() methods for DTOs (default: true). | |
EnforceFlagEnums | |
Specifies whether enums should be always generated as bit flags (default: false). | |
ParameterArrayType | |
The generic array .NET type of operation parameters (default: 'IEnumerable'). | |
ParameterDictionaryType | |
The generic dictionary .NET type of operation parameters (default: 'IDictionary'). | |
ResponseArrayType | |
The generic array .NET type of operation responses (default: 'ICollection'). | |
ResponseDictionaryType | |
The generic dictionary .NET type of operation responses (default: 'IDictionary'). | |
WrapResponses | |
Specifies whether to wrap success responses to allow full response access. | |
WrapResponseMethods | |
List of methods where responses are wrapped ('ControllerName.MethodName', WrapResponses must be true). | |
GenerateResponseClasses | |
Specifies whether to generate response classes (default: true). | |
ResponseClass | |
The response class (default 'SwaggerResponse', may use '{controller}' placeholder). | |
Namespace | |
The namespace of the generated classes. | |
RequiredPropertiesMustBeDefined | |
Specifies whether a required property must be defined in JSON (sets Required.Always when the property is required). | |
DateType | |
The date .NET type (default: 'DateTimeOffset'). | |
JsonConverters | |
Specifies the custom Json.NET converter types (optional, comma separated). | |
AnyType | |
The any .NET type (default: 'object'). | |
DateTimeType | |
The date time .NET type (default: 'DateTimeOffset'). | |
TimeType | |
The time .NET type (default: 'TimeSpan'). | |
TimeSpanType | |
The time span .NET type (default: 'TimeSpan'). | |
ArrayType | |
The generic array .NET type (default: 'ICollection'). | |
ArrayInstanceType | |
The generic array .NET instance type (default: empty = ArrayType). | |
DictionaryType | |
The generic dictionary .NET type (default: 'IDictionary'). | |
DictionaryInstanceType | |
The generic dictionary .NET instance type (default: empty = DictionaryType). | |
ArrayBaseType | |
The generic array .NET type (default: 'Collection'). | |
DictionaryBaseType | |
The generic dictionary .NET type (default: 'Dictionary'). | |
ClassStyle | |
The CSharp class style, 'Poco' or 'Inpc' (default: 'Poco'). | |
JsonLibrary | |
The CSharp JSON library, 'NewtonsoftJson' or 'SystemTextJson' (default: 'NewtonsoftJson', 'SystemTextJson' is experimental). | |
GenerateDefaultValues | |
Specifies whether to generate default values for properties (may generate CSharp 6 code, default: true). | |
GenerateDataAnnotations | |
Specifies whether to generate data annotation attributes on DTO classes (default: true). | |
ExcludedTypeNames | |
The excluded DTO type names (must be defined in an import or other namespace). | |
ExcludedParameterNames | |
The globally excluded parameter names. | |
HandleReferences | |
Use preserve references handling (All) in the JSON serializer (default: false). | |
GenerateImmutableArrayProperties | |
Specifies whether to remove the setter for non-nullable array properties (default: false). | |
GenerateImmutableDictionaryProperties | |
Specifies whether to remove the setter for non-nullable dictionary properties (default: false). | |
JsonSerializerSettingsTransformationMethod | |
The name of a static method which is called to transform the JsonSerializerSettings used in the generated ToJson()/FromJson() methods (default: none). | |
InlineNamedArrays | |
Inline named arrays (default: false). | |
InlineNamedDictionaries | |
Inline named dictionaries (default: false). | |
InlineNamedTuples | |
Inline named tuples (default: true). | |
InlineNamedAny | |
Inline named any types (default: false). | |
GenerateDtoTypes | |
Specifies whether to generate DTO classes. | |
GenerateOptionalPropertiesAsNullable | |
Specifies whether optional schema properties (not required) are generated as nullable properties (default: false). | |
GenerateNullableReferenceTypes | |
Specifies whether whether to generate Nullable Reference Type annotations (default: false). | |
TemplateDirectory | |
The Liquid template directory (experimental). | |
TypeNameGenerator | |
The custom ITypeNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
PropertyNameGeneratorType | |
The custom IPropertyNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
EnumNameGeneratorType | |
The custom IEnumNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
ChecksumCacheEnabled | |
Whether output generation can be skipped if source document checksum matches existing output (default: false). | |
Input | |
A file path or URL to the data or the JSON data itself. | |
ServiceHost | |
Overrides the service host of the web document (optional, use '.' to remove the hostname). | |
ServiceSchemes | |
Overrides the allowed schemes of the web service (optional, comma separated, 'http', 'https', 'ws', 'wss'). | |
Output | |
The output file path (optional). | |
NewLineBehavior | |
The new line behavior (Auto (OS default), CRLF, LF). | |
Command: swagger2csclient | |
Generates CSharp client code from a Swagger/OpenAPI specification (obsolete: use openapi2csclient instead). | |
Arguments: | |
ClientBaseClass | |
The client base class (empty for no base class). | |
ConfigurationClass | |
The configuration class. The setting ClientBaseClass must be set. (empty for no configuration class). | |
GenerateClientClasses | |
Specifies whether generate client classes. | |
GenerateClientInterfaces | |
Specifies whether generate interfaces for the client classes. | |
ClientBaseInterface | |
Base interface for client interfaces (empty for no client base interface). | |
InjectHttpClient | |
Specifies whether an HttpClient instance is injected (default: true). | |
DisposeHttpClient | |
Specifies whether to dispose the HttpClient (injected HttpClient is never disposed). | |
ProtectedMethods | |
List of methods with a protected access modifier ('classname.methodname'). | |
GenerateExceptionClasses | |
Specifies whether to generate exception classes (default: true). | |
ExceptionClass | |
The exception class (default 'SwaggerException', may use '{controller}' placeholder). | |
WrapDtoExceptions | |
Specifies whether DTO exceptions are wrapped in a SwaggerException instance (default: true). | |
UseHttpClientCreationMethod | |
Specifies whether to call CreateHttpClientAsync on the base class to create a new HttpClient. | |
HttpClientType | |
Specifies the HttpClient type. By default the 'System.Net.Http.HttpClient' is used. | |
UseHttpRequestMessageCreationMethod | |
Specifies whether to call CreateHttpRequestMessageAsync on the base class to create a new HttpRequestMethod. | |
UseBaseUrl | |
Specifies whether to use and expose the base URL (default: true). | |
GenerateBaseUrlProperty | |
Specifies whether to generate the BaseUrl property, must be defined on the base class otherwise (default: true). | |
GenerateSyncMethods | |
Specifies whether to generate synchronous methods (not recommended, default: false). | |
GeneratePrepareRequestAndProcessResponseAsAsyncMethods | |
Specifies whether to generate PrepareRequest and ProcessResponse methods as asynchronous methods (if true, both must be defined in the base class or in the partial class, default: false). | |
ExposeJsonSerializerSettings | |
Specifies whether to expose the JsonSerializerSettings property (default: false). | |
ClientClassAccessModifier | |
The client class access modifier (default: public). | |
TypeAccessModifier | |
The DTO class/enum access modifier (default: public). | |
GenerateContractsOutput | |
Specifies whether to generate contracts output (interface and models in a separate file set with the ContractsOutput parameter). | |
ContractsNamespace | |
The contracts .NET namespace. | |
ContractsOutput | |
The contracts output file path (optional, if no path is set then a single file with the implementation and contracts is generated). | |
ParameterDateTimeFormat | |
Specifies the format for DateTime type method parameters (default: s). | |
ParameterDateFormat | |
Specifies the format for Date type method parameters (default: yyyy-MM-dd). | |
GenerateUpdateJsonSerializerSettingsMethod | |
Generate the UpdateJsonSerializerSettings method (must be implemented in the base class otherwise, default: true). | |
UseRequestAndResponseSerializationSettings | |
Generate different request and response serialization settings (default: false). | |
SerializeTypeInformation | |
Serialize the type information in a $type property (not recommended, also sets TypeNameHandling = Auto, default: true). | |
QueryNullValue | |
The null value used for query parameters which are null (default: ''). | |
ClassName | |
The class name of the generated client. | |
OperationGenerationMode | |
The operation generation mode ('SingleClientFromOperationId' or 'MultipleClientsFromPathSegments'). | |
AdditionalNamespaceUsages | |
The additional namespace usages. | |
AdditionalContractNamespaceUsages | |
The additional contract namespace usages. | |
GenerateOptionalParameters | |
Specifies whether to reorder parameters (required first, optional at the end) and generate optional parameters (default: false). | |
GenerateJsonMethods | |
Specifies whether to render ToJson() and FromJson() methods for DTOs (default: true). | |
EnforceFlagEnums | |
Specifies whether enums should be always generated as bit flags (default: false). | |
ParameterArrayType | |
The generic array .NET type of operation parameters (default: 'IEnumerable'). | |
ParameterDictionaryType | |
The generic dictionary .NET type of operation parameters (default: 'IDictionary'). | |
ResponseArrayType | |
The generic array .NET type of operation responses (default: 'ICollection'). | |
ResponseDictionaryType | |
The generic dictionary .NET type of operation responses (default: 'IDictionary'). | |
WrapResponses | |
Specifies whether to wrap success responses to allow full response access. | |
WrapResponseMethods | |
List of methods where responses are wrapped ('ControllerName.MethodName', WrapResponses must be true). | |
GenerateResponseClasses | |
Specifies whether to generate response classes (default: true). | |
ResponseClass | |
The response class (default 'SwaggerResponse', may use '{controller}' placeholder). | |
Namespace | |
The namespace of the generated classes. | |
RequiredPropertiesMustBeDefined | |
Specifies whether a required property must be defined in JSON (sets Required.Always when the property is required). | |
DateType | |
The date .NET type (default: 'DateTimeOffset'). | |
JsonConverters | |
Specifies the custom Json.NET converter types (optional, comma separated). | |
AnyType | |
The any .NET type (default: 'object'). | |
DateTimeType | |
The date time .NET type (default: 'DateTimeOffset'). | |
TimeType | |
The time .NET type (default: 'TimeSpan'). | |
TimeSpanType | |
The time span .NET type (default: 'TimeSpan'). | |
ArrayType | |
The generic array .NET type (default: 'ICollection'). | |
ArrayInstanceType | |
The generic array .NET instance type (default: empty = ArrayType). | |
DictionaryType | |
The generic dictionary .NET type (default: 'IDictionary'). | |
DictionaryInstanceType | |
The generic dictionary .NET instance type (default: empty = DictionaryType). | |
ArrayBaseType | |
The generic array .NET type (default: 'Collection'). | |
DictionaryBaseType | |
The generic dictionary .NET type (default: 'Dictionary'). | |
ClassStyle | |
The CSharp class style, 'Poco' or 'Inpc' (default: 'Poco'). | |
JsonLibrary | |
The CSharp JSON library, 'NewtonsoftJson' or 'SystemTextJson' (default: 'NewtonsoftJson', 'SystemTextJson' is experimental). | |
GenerateDefaultValues | |
Specifies whether to generate default values for properties (may generate CSharp 6 code, default: true). | |
GenerateDataAnnotations | |
Specifies whether to generate data annotation attributes on DTO classes (default: true). | |
ExcludedTypeNames | |
The excluded DTO type names (must be defined in an import or other namespace). | |
ExcludedParameterNames | |
The globally excluded parameter names. | |
HandleReferences | |
Use preserve references handling (All) in the JSON serializer (default: false). | |
GenerateImmutableArrayProperties | |
Specifies whether to remove the setter for non-nullable array properties (default: false). | |
GenerateImmutableDictionaryProperties | |
Specifies whether to remove the setter for non-nullable dictionary properties (default: false). | |
JsonSerializerSettingsTransformationMethod | |
The name of a static method which is called to transform the JsonSerializerSettings used in the generated ToJson()/FromJson() methods (default: none). | |
InlineNamedArrays | |
Inline named arrays (default: false). | |
InlineNamedDictionaries | |
Inline named dictionaries (default: false). | |
InlineNamedTuples | |
Inline named tuples (default: true). | |
InlineNamedAny | |
Inline named any types (default: false). | |
GenerateDtoTypes | |
Specifies whether to generate DTO classes. | |
GenerateOptionalPropertiesAsNullable | |
Specifies whether optional schema properties (not required) are generated as nullable properties (default: false). | |
GenerateNullableReferenceTypes | |
Specifies whether whether to generate Nullable Reference Type annotations (default: false). | |
TemplateDirectory | |
The Liquid template directory (experimental). | |
TypeNameGenerator | |
The custom ITypeNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
PropertyNameGeneratorType | |
The custom IPropertyNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
EnumNameGeneratorType | |
The custom IEnumNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
ChecksumCacheEnabled | |
Whether output generation can be skipped if source document checksum matches existing output (default: false). | |
Input | |
A file path or URL to the data or the JSON data itself. | |
ServiceHost | |
Overrides the service host of the web document (optional, use '.' to remove the hostname). | |
ServiceSchemes | |
Overrides the allowed schemes of the web service (optional, comma separated, 'http', 'https', 'ws', 'wss'). | |
Output | |
The output file path (optional). | |
NewLineBehavior | |
The new line behavior (Auto (OS default), CRLF, LF). | |
Command: openapi2cscontroller | |
Generates CSharp Web API controller code from a Swagger/OpenAPI specification. | |
Arguments: | |
ControllerBaseClass | |
The controller base class (empty for 'ApiController'). | |
ControllerStyle | |
The controller generation style (partial, abstract; default: partial). | |
ControllerTarget | |
controller target framework (default: AspNetCore). | |
UseCancellationToken | |
Add a cancellation token parameter (default: false). | |
UseActionResultType | |
Use ASP.Net Core (2.1) ActionResult type as return type (default: false) | |
GenerateModelValidationAttributes | |
Add model validation attributes (default: false). | |
RouteNamingStrategy | |
The strategy for naming controller routes (none, operationid; default: none). | |
BasePath | |
The Base path on which the API is served, which is relative to the Host | |
ClassName | |
The class name of the generated client. | |
OperationGenerationMode | |
The operation generation mode ('SingleClientFromOperationId' or 'MultipleClientsFromPathSegments'). | |
AdditionalNamespaceUsages | |
The additional namespace usages. | |
AdditionalContractNamespaceUsages | |
The additional contract namespace usages. | |
GenerateOptionalParameters | |
Specifies whether to reorder parameters (required first, optional at the end) and generate optional parameters (default: false). | |
GenerateJsonMethods | |
Specifies whether to render ToJson() and FromJson() methods for DTOs (default: true). | |
EnforceFlagEnums | |
Specifies whether enums should be always generated as bit flags (default: false). | |
ParameterArrayType | |
The generic array .NET type of operation parameters (default: 'IEnumerable'). | |
ParameterDictionaryType | |
The generic dictionary .NET type of operation parameters (default: 'IDictionary'). | |
ResponseArrayType | |
The generic array .NET type of operation responses (default: 'ICollection'). | |
ResponseDictionaryType | |
The generic dictionary .NET type of operation responses (default: 'IDictionary'). | |
WrapResponses | |
Specifies whether to wrap success responses to allow full response access. | |
WrapResponseMethods | |
List of methods where responses are wrapped ('ControllerName.MethodName', WrapResponses must be true). | |
GenerateResponseClasses | |
Specifies whether to generate response classes (default: true). | |
ResponseClass | |
The response class (default 'SwaggerResponse', may use '{controller}' placeholder). | |
Namespace | |
The namespace of the generated classes. | |
RequiredPropertiesMustBeDefined | |
Specifies whether a required property must be defined in JSON (sets Required.Always when the property is required). | |
DateType | |
The date .NET type (default: 'DateTimeOffset'). | |
JsonConverters | |
Specifies the custom Json.NET converter types (optional, comma separated). | |
AnyType | |
The any .NET type (default: 'object'). | |
DateTimeType | |
The date time .NET type (default: 'DateTimeOffset'). | |
TimeType | |
The time .NET type (default: 'TimeSpan'). | |
TimeSpanType | |
The time span .NET type (default: 'TimeSpan'). | |
ArrayType | |
The generic array .NET type (default: 'ICollection'). | |
ArrayInstanceType | |
The generic array .NET instance type (default: empty = ArrayType). | |
DictionaryType | |
The generic dictionary .NET type (default: 'IDictionary'). | |
DictionaryInstanceType | |
The generic dictionary .NET instance type (default: empty = DictionaryType). | |
ArrayBaseType | |
The generic array .NET type (default: 'Collection'). | |
DictionaryBaseType | |
The generic dictionary .NET type (default: 'Dictionary'). | |
ClassStyle | |
The CSharp class style, 'Poco' or 'Inpc' (default: 'Poco'). | |
JsonLibrary | |
The CSharp JSON library, 'NewtonsoftJson' or 'SystemTextJson' (default: 'NewtonsoftJson', 'SystemTextJson' is experimental). | |
GenerateDefaultValues | |
Specifies whether to generate default values for properties (may generate CSharp 6 code, default: true). | |
GenerateDataAnnotations | |
Specifies whether to generate data annotation attributes on DTO classes (default: true). | |
ExcludedTypeNames | |
The excluded DTO type names (must be defined in an import or other namespace). | |
ExcludedParameterNames | |
The globally excluded parameter names. | |
HandleReferences | |
Use preserve references handling (All) in the JSON serializer (default: false). | |
GenerateImmutableArrayProperties | |
Specifies whether to remove the setter for non-nullable array properties (default: false). | |
GenerateImmutableDictionaryProperties | |
Specifies whether to remove the setter for non-nullable dictionary properties (default: false). | |
JsonSerializerSettingsTransformationMethod | |
The name of a static method which is called to transform the JsonSerializerSettings used in the generated ToJson()/FromJson() methods (default: none). | |
InlineNamedArrays | |
Inline named arrays (default: false). | |
InlineNamedDictionaries | |
Inline named dictionaries (default: false). | |
InlineNamedTuples | |
Inline named tuples (default: true). | |
InlineNamedAny | |
Inline named any types (default: false). | |
GenerateDtoTypes | |
Specifies whether to generate DTO classes. | |
GenerateOptionalPropertiesAsNullable | |
Specifies whether optional schema properties (not required) are generated as nullable properties (default: false). | |
GenerateNullableReferenceTypes | |
Specifies whether whether to generate Nullable Reference Type annotations (default: false). | |
TemplateDirectory | |
The Liquid template directory (experimental). | |
TypeNameGenerator | |
The custom ITypeNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
PropertyNameGeneratorType | |
The custom IPropertyNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
EnumNameGeneratorType | |
The custom IEnumNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
ChecksumCacheEnabled | |
Whether output generation can be skipped if source document checksum matches existing output (default: false). | |
Input | |
A file path or URL to the data or the JSON data itself. | |
ServiceHost | |
Overrides the service host of the web document (optional, use '.' to remove the hostname). | |
ServiceSchemes | |
Overrides the allowed schemes of the web service (optional, comma separated, 'http', 'https', 'ws', 'wss'). | |
Output | |
The output file path (optional). | |
NewLineBehavior | |
The new line behavior (Auto (OS default), CRLF, LF). | |
Command: swagger2cscontroller | |
Generates CSharp Web API controller code from a Swagger/OpenAPI specification (obsolete: use openapi2cscontroller instead). | |
Arguments: | |
ControllerBaseClass | |
The controller base class (empty for 'ApiController'). | |
ControllerStyle | |
The controller generation style (partial, abstract; default: partial). | |
ControllerTarget | |
controller target framework (default: AspNetCore). | |
UseCancellationToken | |
Add a cancellation token parameter (default: false). | |
UseActionResultType | |
Use ASP.Net Core (2.1) ActionResult type as return type (default: false) | |
GenerateModelValidationAttributes | |
Add model validation attributes (default: false). | |
RouteNamingStrategy | |
The strategy for naming controller routes (none, operationid; default: none). | |
BasePath | |
The Base path on which the API is served, which is relative to the Host | |
ClassName | |
The class name of the generated client. | |
OperationGenerationMode | |
The operation generation mode ('SingleClientFromOperationId' or 'MultipleClientsFromPathSegments'). | |
AdditionalNamespaceUsages | |
The additional namespace usages. | |
AdditionalContractNamespaceUsages | |
The additional contract namespace usages. | |
GenerateOptionalParameters | |
Specifies whether to reorder parameters (required first, optional at the end) and generate optional parameters (default: false). | |
GenerateJsonMethods | |
Specifies whether to render ToJson() and FromJson() methods for DTOs (default: true). | |
EnforceFlagEnums | |
Specifies whether enums should be always generated as bit flags (default: false). | |
ParameterArrayType | |
The generic array .NET type of operation parameters (default: 'IEnumerable'). | |
ParameterDictionaryType | |
The generic dictionary .NET type of operation parameters (default: 'IDictionary'). | |
ResponseArrayType | |
The generic array .NET type of operation responses (default: 'ICollection'). | |
ResponseDictionaryType | |
The generic dictionary .NET type of operation responses (default: 'IDictionary'). | |
WrapResponses | |
Specifies whether to wrap success responses to allow full response access. | |
WrapResponseMethods | |
List of methods where responses are wrapped ('ControllerName.MethodName', WrapResponses must be true). | |
GenerateResponseClasses | |
Specifies whether to generate response classes (default: true). | |
ResponseClass | |
The response class (default 'SwaggerResponse', may use '{controller}' placeholder). | |
Namespace | |
The namespace of the generated classes. | |
RequiredPropertiesMustBeDefined | |
Specifies whether a required property must be defined in JSON (sets Required.Always when the property is required). | |
DateType | |
The date .NET type (default: 'DateTimeOffset'). | |
JsonConverters | |
Specifies the custom Json.NET converter types (optional, comma separated). | |
AnyType | |
The any .NET type (default: 'object'). | |
DateTimeType | |
The date time .NET type (default: 'DateTimeOffset'). | |
TimeType | |
The time .NET type (default: 'TimeSpan'). | |
TimeSpanType | |
The time span .NET type (default: 'TimeSpan'). | |
ArrayType | |
The generic array .NET type (default: 'ICollection'). | |
ArrayInstanceType | |
The generic array .NET instance type (default: empty = ArrayType). | |
DictionaryType | |
The generic dictionary .NET type (default: 'IDictionary'). | |
DictionaryInstanceType | |
The generic dictionary .NET instance type (default: empty = DictionaryType). | |
ArrayBaseType | |
The generic array .NET type (default: 'Collection'). | |
DictionaryBaseType | |
The generic dictionary .NET type (default: 'Dictionary'). | |
ClassStyle | |
The CSharp class style, 'Poco' or 'Inpc' (default: 'Poco'). | |
JsonLibrary | |
The CSharp JSON library, 'NewtonsoftJson' or 'SystemTextJson' (default: 'NewtonsoftJson', 'SystemTextJson' is experimental). | |
GenerateDefaultValues | |
Specifies whether to generate default values for properties (may generate CSharp 6 code, default: true). | |
GenerateDataAnnotations | |
Specifies whether to generate data annotation attributes on DTO classes (default: true). | |
ExcludedTypeNames | |
The excluded DTO type names (must be defined in an import or other namespace). | |
ExcludedParameterNames | |
The globally excluded parameter names. | |
HandleReferences | |
Use preserve references handling (All) in the JSON serializer (default: false). | |
GenerateImmutableArrayProperties | |
Specifies whether to remove the setter for non-nullable array properties (default: false). | |
GenerateImmutableDictionaryProperties | |
Specifies whether to remove the setter for non-nullable dictionary properties (default: false). | |
JsonSerializerSettingsTransformationMethod | |
The name of a static method which is called to transform the JsonSerializerSettings used in the generated ToJson()/FromJson() methods (default: none). | |
InlineNamedArrays | |
Inline named arrays (default: false). | |
InlineNamedDictionaries | |
Inline named dictionaries (default: false). | |
InlineNamedTuples | |
Inline named tuples (default: true). | |
InlineNamedAny | |
Inline named any types (default: false). | |
GenerateDtoTypes | |
Specifies whether to generate DTO classes. | |
GenerateOptionalPropertiesAsNullable | |
Specifies whether optional schema properties (not required) are generated as nullable properties (default: false). | |
GenerateNullableReferenceTypes | |
Specifies whether whether to generate Nullable Reference Type annotations (default: false). | |
TemplateDirectory | |
The Liquid template directory (experimental). | |
TypeNameGenerator | |
The custom ITypeNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
PropertyNameGeneratorType | |
The custom IPropertyNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
EnumNameGeneratorType | |
The custom IEnumNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
ChecksumCacheEnabled | |
Whether output generation can be skipped if source document checksum matches existing output (default: false). | |
Input | |
A file path or URL to the data or the JSON data itself. | |
ServiceHost | |
Overrides the service host of the web document (optional, use '.' to remove the hostname). | |
ServiceSchemes | |
Overrides the allowed schemes of the web service (optional, comma separated, 'http', 'https', 'ws', 'wss'). | |
Output | |
The output file path (optional). | |
NewLineBehavior | |
The new line behavior (Auto (OS default), CRLF, LF). | |
Command: openapi2tsclient | |
Generates TypeScript client code from a Swagger/OpenAPI specification. | |
Arguments: | |
ClassName | |
The class name of the generated client. | |
ModuleName | |
The TypeScript module name (default: '', no module). | |
Namespace | |
The TypeScript namespace (default: '', no namespace). | |
TypeScriptVersion | |
The target TypeScript version (default: 2.7). | |
Template | |
The type of the asynchronism handling ('JQueryCallbacks', 'JQueryPromises', 'AngularJS', 'Angular', 'Fetch', 'Aurelia'). | |
PromiseType | |
The promise type ('Promise' or 'QPromise'). | |
HttpClass | |
The Angular HTTP service class (default 'Http', 'HttpClient'). | |
WithCredentials | |
The Angular HttpClient will send withCredentials: true in http requests (default: false). | |
UseSingletonProvider | |
Specifies whether to use the Angular 6 Singleton Provider (Angular template only, default: false). | |
InjectionTokenType | |
The Angular injection token type (default 'InjectionToken', 'OpaqueToken'). | |
RxJsVersion | |
The target RxJs version (default: 6.0). | |
DateTimeType | |
The date time type ('Date', 'MomentJS', 'Luxon', 'DayJS', 'OffsetMomentJS', 'string'). | |
NullValue | |
The null value used in object initializers (default 'Undefined', 'Null'). | |
GenerateClientClasses | |
Specifies whether generate client classes. | |
GenerateClientInterfaces | |
Specifies whether generate interfaces for the client classes (default: false). | |
GenerateOptionalParameters | |
Specifies whether to reorder parameters (required first, optional at the end) and generate optional parameters (default: false). | |
ExportTypes | |
Specifies whether the export keyword should be added to all classes, interfaces and enums (default: true). | |
WrapDtoExceptions | |
Specifies whether DTO exceptions are wrapped in a SwaggerException instance (default: false). | |
ExceptionClass | |
The exception class (default 'ApiException'). | |
ClientBaseClass | |
The base class of the generated client classes (optional, must be imported or implemented in the extension code). | |
WrapResponses | |
Specifies whether to wrap success responses to allow full response access (experimental). | |
WrapResponseMethods | |
List of methods where responses are wrapped ('ControllerName.MethodName', WrapResponses must be true). | |
GenerateResponseClasses | |
Specifies whether to generate response classes (default: true). | |
ResponseClass | |
The response class (default 'SwaggerResponse', may use '{controller}' placeholder). | |
ProtectedMethods | |
List of methods with a protected access modifier ('classname.methodname'). | |
ConfigurationClass | |
The configuration class. The setting ClientBaseClass must be set. (empty for no configuration class). | |
UseTransformOptionsMethod | |
Call 'transformOptions' on the base class or extension class (default: false). | |
UseTransformResultMethod | |
Call 'transformResult' on the base class or extension class (default: false). | |
GenerateDtoTypes | |
Specifies whether to generate DTO classes. | |
OperationGenerationMode | |
The operation generation mode ('SingleClientFromOperationId' or 'MultipleClientsFromPathSegments'). | |
MarkOptionalProperties | |
Specifies whether to mark optional properties with ? (default: false). | |
GenerateCloneMethod | |
Specifies whether a clone() method should be generated in the DTO classes (default: false). | |
TypeStyle | |
The type style (default: Class). | |
EnumStyle | |
The enum style (Enum or StringLiteral, default: Enum). | |
UseLeafType | |
Generate leaf types for an object with discriminator (default: false). | |
ClassTypes | |
The type names which always generate plain TypeScript classes. | |
ExtendedClasses | |
The list of extended classes. | |
ExtensionCode | |
The extension code (string or file path). | |
GenerateDefaultValues | |
Specifies whether to generate default values for properties (default: true). | |
ExcludedTypeNames | |
The excluded DTO type names (must be defined in an import or other namespace). | |
ExcludedParameterNames | |
The globally excluded parameter names. | |
HandleReferences | |
Handle JSON references (default: false). | |
GenerateConstructorInterface | |
Generate an class interface which is used in the constructor to initialize the class (only available when TypeStyle is Class, default: true). | |
ConvertConstructorInterfaceData | |
Convert POJO objects in the constructor data to DTO instances (GenerateConstructorInterface must be enabled, default: false). | |
ImportRequiredTypes | |
Specifies whether required types should be imported (default: true). | |
UseGetBaseUrlMethod | |
Specifies whether to use the 'getBaseUrl(defaultUrl: string)' method from the base class (default: false). | |
BaseUrlTokenName | |
The token name for injecting the API base URL string (used in the Angular template, default: 'API_BASE_URL'). | |
QueryNullValue | |
The null value used for query parameters which are null (default: ''). | |
UseAbortSignal | |
Specifies whether to use the AbortSignal (Fetch/Aurelia template only, default: false). | |
InlineNamedDictionaries | |
Inline named dictionaries (default: false). | |
InlineNamedAny | |
Inline named any types (default: false). | |
TemplateDirectory | |
The Liquid template directory (experimental). | |
TypeNameGenerator | |
The custom ITypeNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
PropertyNameGeneratorType | |
The custom IPropertyNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
EnumNameGeneratorType | |
The custom IEnumNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
ChecksumCacheEnabled | |
Whether output generation can be skipped if source document checksum matches existing output (default: false). | |
Input | |
A file path or URL to the data or the JSON data itself. | |
ServiceHost | |
Overrides the service host of the web document (optional, use '.' to remove the hostname). | |
ServiceSchemes | |
Overrides the allowed schemes of the web service (optional, comma separated, 'http', 'https', 'ws', 'wss'). | |
Output | |
The output file path (optional). | |
NewLineBehavior | |
The new line behavior (Auto (OS default), CRLF, LF). | |
Command: swagger2tsclient | |
Generates TypeScript client code from a Swagger/OpenAPI specification (obsolete: use openapi2tsclient instead). | |
Arguments: | |
ClassName | |
The class name of the generated client. | |
ModuleName | |
The TypeScript module name (default: '', no module). | |
Namespace | |
The TypeScript namespace (default: '', no namespace). | |
TypeScriptVersion | |
The target TypeScript version (default: 2.7). | |
Template | |
The type of the asynchronism handling ('JQueryCallbacks', 'JQueryPromises', 'AngularJS', 'Angular', 'Fetch', 'Aurelia'). | |
PromiseType | |
The promise type ('Promise' or 'QPromise'). | |
HttpClass | |
The Angular HTTP service class (default 'Http', 'HttpClient'). | |
WithCredentials | |
The Angular HttpClient will send withCredentials: true in http requests (default: false). | |
UseSingletonProvider | |
Specifies whether to use the Angular 6 Singleton Provider (Angular template only, default: false). | |
InjectionTokenType | |
The Angular injection token type (default 'InjectionToken', 'OpaqueToken'). | |
RxJsVersion | |
The target RxJs version (default: 6.0). | |
DateTimeType | |
The date time type ('Date', 'MomentJS', 'Luxon', 'DayJS', 'OffsetMomentJS', 'string'). | |
NullValue | |
The null value used in object initializers (default 'Undefined', 'Null'). | |
GenerateClientClasses | |
Specifies whether generate client classes. | |
GenerateClientInterfaces | |
Specifies whether generate interfaces for the client classes (default: false). | |
GenerateOptionalParameters | |
Specifies whether to reorder parameters (required first, optional at the end) and generate optional parameters (default: false). | |
ExportTypes | |
Specifies whether the export keyword should be added to all classes, interfaces and enums (default: true). | |
WrapDtoExceptions | |
Specifies whether DTO exceptions are wrapped in a SwaggerException instance (default: false). | |
ExceptionClass | |
The exception class (default 'ApiException'). | |
ClientBaseClass | |
The base class of the generated client classes (optional, must be imported or implemented in the extension code). | |
WrapResponses | |
Specifies whether to wrap success responses to allow full response access (experimental). | |
WrapResponseMethods | |
List of methods where responses are wrapped ('ControllerName.MethodName', WrapResponses must be true). | |
GenerateResponseClasses | |
Specifies whether to generate response classes (default: true). | |
ResponseClass | |
The response class (default 'SwaggerResponse', may use '{controller}' placeholder). | |
ProtectedMethods | |
List of methods with a protected access modifier ('classname.methodname'). | |
ConfigurationClass | |
The configuration class. The setting ClientBaseClass must be set. (empty for no configuration class). | |
UseTransformOptionsMethod | |
Call 'transformOptions' on the base class or extension class (default: false). | |
UseTransformResultMethod | |
Call 'transformResult' on the base class or extension class (default: false). | |
GenerateDtoTypes | |
Specifies whether to generate DTO classes. | |
OperationGenerationMode | |
The operation generation mode ('SingleClientFromOperationId' or 'MultipleClientsFromPathSegments'). | |
MarkOptionalProperties | |
Specifies whether to mark optional properties with ? (default: false). | |
GenerateCloneMethod | |
Specifies whether a clone() method should be generated in the DTO classes (default: false). | |
TypeStyle | |
The type style (default: Class). | |
EnumStyle | |
The enum style (Enum or StringLiteral, default: Enum). | |
UseLeafType | |
Generate leaf types for an object with discriminator (default: false). | |
ClassTypes | |
The type names which always generate plain TypeScript classes. | |
ExtendedClasses | |
The list of extended classes. | |
ExtensionCode | |
The extension code (string or file path). | |
GenerateDefaultValues | |
Specifies whether to generate default values for properties (default: true). | |
ExcludedTypeNames | |
The excluded DTO type names (must be defined in an import or other namespace). | |
ExcludedParameterNames | |
The globally excluded parameter names. | |
HandleReferences | |
Handle JSON references (default: false). | |
GenerateConstructorInterface | |
Generate an class interface which is used in the constructor to initialize the class (only available when TypeStyle is Class, default: true). | |
ConvertConstructorInterfaceData | |
Convert POJO objects in the constructor data to DTO instances (GenerateConstructorInterface must be enabled, default: false). | |
ImportRequiredTypes | |
Specifies whether required types should be imported (default: true). | |
UseGetBaseUrlMethod | |
Specifies whether to use the 'getBaseUrl(defaultUrl: string)' method from the base class (default: false). | |
BaseUrlTokenName | |
The token name for injecting the API base URL string (used in the Angular template, default: 'API_BASE_URL'). | |
QueryNullValue | |
The null value used for query parameters which are null (default: ''). | |
UseAbortSignal | |
Specifies whether to use the AbortSignal (Fetch/Aurelia template only, default: false). | |
InlineNamedDictionaries | |
Inline named dictionaries (default: false). | |
InlineNamedAny | |
Inline named any types (default: false). | |
TemplateDirectory | |
The Liquid template directory (experimental). | |
TypeNameGenerator | |
The custom ITypeNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
PropertyNameGeneratorType | |
The custom IPropertyNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
EnumNameGeneratorType | |
The custom IEnumNameGenerator implementation type in the form 'assemblyName:fullTypeName' or 'fullTypeName'). | |
ChecksumCacheEnabled | |
Whether output generation can be skipped if source document checksum matches existing output (default: false). | |
Input | |
A file path or URL to the data or the JSON data itself. | |
ServiceHost | |
Overrides the service host of the web document (optional, use '.' to remove the hostname). | |
ServiceSchemes | |
Overrides the allowed schemes of the web service (optional, comma separated, 'http', 'https', 'ws', 'wss'). | |
Output | |
The output file path (optional). | |
NewLineBehavior | |
The new line behavior (Auto (OS default), CRLF, LF). | |
Duration: 00:00:01.5957840 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment