* [csharp] Convert "false" properties to booleans
It appears as though "false" strings in additionalProperties are no
longer treated as false booleans. This may be an issue elsewhere, but a
simple fix is to always explicitly set the boolean value in a generator
class back to the additionalProperties map to convert boolean Strings to
boolean Objects.
* [nancyfx] Clean up async default option handling
* [nancyfx] Include asyncServer=false in sample script
* [csharp] Regenerate samples
* [csharp] Resolve .net 4 generation issues
Some functionality is missing from .NET 4.0, such as IReadonlyDictionary
and Type.GetTypeInfo().
This commit resolves compilation of generated .NET 4.0 code, requiring
no conditional versioning of Newtonsoft.Json.
* [csharp] Regenerate .net 4.0 sample
* [csharp] Resolve .NET 4.0 sample compile
Sample build.sh wasn't accounting for targeting different FCL correctly.
That is, when passing "net40" to the -sdk option, it would use the
default -sdk:4 and -langversion:6. These don't necessarily match with
what is installed on a machine with only .NET 4.0 (which is our targeted
use case here).
To resolve, we need to define another version-specific value for passing
to the mcs -sdk option (see man mcs for details).
This option currently isn't overridable in the client codegen class.
Also, langversion is set specifically to the version of C# available to
the targeted SDK version. If there is need, we may extend this to
something like:
langversion=${MCS_LANG_VERSION:-6}
To allow users to run as:
env MCS_LANG_VERSION=5 sh build.sh
I haven't done this because I doubt there's much of a use case via this
script. I'm assuming most consumers will build via IDE or MSBuild.
* [csharp] Revert bin/csharp-petstore.sh to 3.5
* [csharp] Regenerate .NET 3.5 sample
* [csharp] Resolve nuget issue with existing files
* [csharp] Update -all.sh, regenerate samples
Possible breaking change.
optionalProjectFileFlag handles the generation of csproj and sln
files. Not modifying the plurality of the option to reduce the
impact of the breaking change for existing settings:
optionalProjectFileFlag=true
=> generates additional .sln file
optionalProjectFileFlag=false
=> no change
unspecified
=> additional files (csproj, sln) may overwrite existing files
Aligns C# project outputs more with community accepted standards and
leverges Nuget for package management.
This also moves the generated C# sample code out of the test project's
Lib folder. The output structure here was causing some issues with
maintainability (e.g. had to update test project with generated code).
(see: https://gist.github.com/davidfowl/ed7564297c61fe9ab814)
Output for a project, IO.Swagger will now look like:
.
├── IO.Swagger.sln
├── README.md
├── bin
├── build.bat
├── build.sh
├── docs
├── packages
└── src
├── IO.Swagger
│ └── packages.config
└── IO.Swagger.Test
└── packages.config
This is a change from the Java-like src/main/csharp/IO/Swagger/etc
structure and will be a breaking change for some.