[csharp] Fix ToJson to work with composition and polymorphism (#7399)

* [csharp] Support composition on toJson

Previous implementation assumed specification only supports polymorphic
associations (via discrimator), although the code didn't seem to be
setup correctly for that in the first place. That is, the parent object
must define the discriminator (see
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#models-with-polymorphism-support),
so NOT HAS parent AND HAS discriminator doesn't make sense.

From a C# perspective, base classes should have the method marked
virtual and derived classes should override the method. This supports
both composition and polymorphic definitions.

* [csharp] Regenerate integration test files

* [csharp] Regenerate samples

* [csharp] Regenerate security sample
This commit is contained in:
Jim Schubert
2018-01-22 01:13:50 -05:00
committed by William Cheng
parent ed7af73f6b
commit 1c4e6b7d46
166 changed files with 177 additions and 172 deletions
@@ -133,7 +133,7 @@ this.{{name}} = {{name}};
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public {{#parent}}{{^isArrayModel}}override {{/isArrayModel}}{{/parent}}{{^parent}}{{#discriminator}}virtual {{/discriminator}}{{/parent}}string ToJson()
public {{#parent}}{{^isArrayModel}}override {{/isArrayModel}}{{/parent}}{{^parent}}virtual {{/parent}}string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -71,7 +71,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -80,7 +80,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -130,7 +130,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -143,7 +143,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -1 +1 @@
2.3.0-SNAPSHOT
2.3.1-SNAPSHOT
@@ -17,11 +17,13 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c
## Dependencies
- [RestSharp](https://www.nuget.org/packages/RestSharp) - 105.1.0 or later
- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later
- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.2.0 or later
The DLLs included in the package may not be the latest version. We recommend using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
```
Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
```
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742)
@@ -11,6 +11,7 @@ if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient
if not exist ".\bin" mkdir bin
copy packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll
copy packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll
copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll
%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\IO.Swagger.dll /recurse:src\IO.Swagger\*.cs /doc:bin\IO.Swagger.xml
%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\IO.Swagger.dll /recurse:src\IO.Swagger\*.cs /doc:bin\IO.Swagger.xml
@@ -33,10 +33,10 @@ esac
echo "[INFO] Target framework: ${frameworkVersion}"
if [ ! type nuget &>/dev/null ]; then
if ! type nuget &>/dev/null; then
echo "[INFO] Download nuget and packages"
wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe;
nuget_cmd="mono nuget"
nuget_cmd="mono nuget.exe"
fi
mozroots --import --sync
@@ -46,9 +46,10 @@ echo "[INFO] Copy DLLs to the 'bin' folder"
mkdir -p bin;
cp packages/Newtonsoft.Json.10.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll;
cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll;
cp packages/JsonSubTypes.1.2.0/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll
echo "[INFO] Run 'mcs' to build bin/IO.Swagger.dll"
mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,\
mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\
bin/RestSharp.dll,\
System.ComponentModel.DataAnnotations.dll,\
System.Runtime.Serialization.dll \
@@ -53,10 +53,10 @@ Contact: apiteam@swagger.io *_/ ' \" =end - - \\r\\n \\n \\r
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="JsonSubTypes">
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\JsonSubTypes.1.1.3\lib\net45\JsonSubTypes.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\JsonSubTypes.1.1.3\lib\net45\JsonSubTypes.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\JsonSubTypes.1.1.3\lib\net45\JsonSubTypes.dll</HintPath>
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\JsonSubTypes.1.1.3\lib\net45\JsonSubTypes.dll</HintPath>
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll</HintPath>
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll</HintPath>
</Reference>
<Reference Include="RestSharp">
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
@@ -3,5 +3,5 @@
<package id="NUnit" version="2.6.4" targetFramework="net45" />
<package id="RestSharp" version="105.1.0" targetFramework="net45" developmentDependency="true" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net45" developmentDependency="true" />
<package id="JsonSubTypes" version="1.1.3" targetFramework="net45" developmentDependency="true" />
<package id="JsonSubTypes" version="1.2.0" targetFramework="net45" developmentDependency="true" />
</packages>
@@ -95,7 +95,7 @@ namespace IO.Swagger.Client
/// <value>An instance of the IReadableConfiguration.</value>
/// <remarks>
/// <see cref="IReadableConfiguration"/> helps us to avoid modifying possibly global
/// configuration values from within a given client. It does not gaurantee thread-safety
/// configuration values from within a given client. It does not guarantee thread-safety
/// of the <see cref="Configuration"/> instance in any way.
/// </remarks>
public IReadableConfiguration Configuration { get; set; }
@@ -54,10 +54,10 @@ Contact: apiteam@swagger.io *_/ ' \" =end - - \\r\\n \\n \\r
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="JsonSubTypes">
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\JsonSubTypes.1.1.3\lib\net45\JsonSubTypes.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\JsonSubTypes.1.1.3\lib\net45\JsonSubTypes.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\JsonSubTypes.1.1.3\lib\net45\JsonSubTypes.dll</HintPath>
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\JsonSubTypes.1.1.3\lib\net45\JsonSubTypes.dll</HintPath>
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll</HintPath>
<HintPath Condition="Exists('..\packages')">..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll</HintPath>
<HintPath Condition="Exists('..\..\packages')">..\..\packages\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll</HintPath>
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\JsonSubTypes.1.2.0\lib\net45\JsonSubTypes.dll</HintPath>
</Reference>
<Reference Include="RestSharp">
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
@@ -27,6 +27,7 @@
<dependencies>
<dependency id="NewtonSoft.Json" version="10.0.3" />
<dependency id="JsonSubTypes" version="1.2.0" />
<dependency id="RestSharp" version="105.1.0" />
</dependencies>
@@ -63,7 +63,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -2,5 +2,5 @@
<packages>
<package id="RestSharp" version="105.1.0" targetFramework="net45" developmentDependency="true" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net45" developmentDependency="true" />
<package id="JsonSubTypes" version="1.1.3" targetFramework="net45" developmentDependency="true" />
<package id="JsonSubTypes" version="1.2.0" targetFramework="net45" developmentDependency="true" />
</packages>
@@ -71,7 +71,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -80,7 +80,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -80,7 +80,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -108,7 +108,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -71,7 +71,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -112,7 +112,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -154,7 +154,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -208,7 +208,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -68,7 +68,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -92,7 +92,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -80,7 +80,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -71,7 +71,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -98,7 +98,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -143,7 +143,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -54,7 +54,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -80,7 +80,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -54,7 +54,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -54,7 +54,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -156,7 +156,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -69,7 +69,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -71,7 +71,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -126,7 +126,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -71,7 +71,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -80,7 +80,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -80,7 +80,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -108,7 +108,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -71,7 +71,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -112,7 +112,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -154,7 +154,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -208,7 +208,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -68,7 +68,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -92,7 +92,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -80,7 +80,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -71,7 +71,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -98,7 +98,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -143,7 +143,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -54,7 +54,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -80,7 +80,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -54,7 +54,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -54,7 +54,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -156,7 +156,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -69,7 +69,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -71,7 +71,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -126,7 +126,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -71,7 +71,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -80,7 +80,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -80,7 +80,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -108,7 +108,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -71,7 +71,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -112,7 +112,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -154,7 +154,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -208,7 +208,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -68,7 +68,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -92,7 +92,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -80,7 +80,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -71,7 +71,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -98,7 +98,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -62,7 +62,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -143,7 +143,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -54,7 +54,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -80,7 +80,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
@@ -54,7 +54,7 @@ namespace IO.Swagger.Model
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson()
public virtual string ToJson()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}

Some files were not shown because too many files have changed in this diff Show More