EonaCat Http Client OpenApi Generator.
$ dotnet add package EonaCat.HttpClient.OpenApi.GeneratorEonaCatHttpClientOpenApiGenerator is a global dotnet tool used to generate EonaCat HttpClient client code from OpenApi schemas.
With .NET 5 installed run: dotnet tool install -g EonaCat.HttpClient.OpenApi.Generator
Typing EonaCat.HttpClient.OpenApi.Generator -h will display a list of parameters:
-u or --url - url to OpenApi json or yaml-f or --file - path to OpenApi json or yaml local file-o or --outputDirectory - where to put the generated files
-p or --projectName - project name and root namespace
--groupBy or --groupingStrategy - method of grouping paths into interfaces
FirstTagFirstTag - uses the first tag in the array for the given pathMostCommonTag - uses the most used tag, produces the smallest number of interfacesLeastCommonTag - uses the least used tag, produces the largest number of finely grained interfaces-r or --removeIfExists - a flag which controls whether to delete the output directory if exists first--executable - generate a .NET 5 console app with a basic setup instead of .NET Standard 2.0 class library--ignoreAllHeaders - do not include any header parameters in the resulting code--ignoredHeaders - provide a list of headers to ignore, redundant if --ignoreAllHeaders flag is used--addEqualsNullToOptionalParameters - if a method parameter is optional, it is generated with a default value of null--conflictingNameAffix - adds an affix to a property if its name conflicts with the enclosing type name, not validated whether the resulting property name is a valid identifier
Prop--prefixConflictingName - if this flag is set, the --conflictingNameAffix will be a prefix, otherwise it will be a suffix--skipDeprecatedProperties - if this flag is set, schema properties marked as are not included in the modelDeprecated