zijianhuang / openapiclientgen

Generate strongly typed C# and TypeScript client codes from Open API / Swagger definitions supporting jQuery, Angular, AXIOS, Fetch API, Aurelia and Angular Strictly Typed Forms
MIT License
68 stars 13 forks source link

Add System.Text.Json support #31

Closed Kim-SSi closed 3 years ago

Kim-SSi commented 3 years ago

Change the strings containing tabs to use \t. Add System.Text.Json support Add new settings:

Use System.Text.Json instead of Newtonsoft.Json public bool UseSystemTextJson { get; set; }

Generated data types will be decorated with JsonProperty with the PropertyName in C#. public bool DecorateDataModelWithPropertyName { get; set; }

Disable property nullable by default. Set by the OpenApi v3 option nullable public bool DisableSystemNullableByDefault { get; set; }

Use T? instead of System.Nullable. C# 8.0 feature public bool UseCSharpNullable { get; set; }

Create the Model classes only public bool GenerateModelsOnly { get; set; }

Create arrays as List public bool ArrayAsList { get; set; }

Create arrays as ICollection public bool ArrayAsICollection { get; set; }