forked from loafle/openapi-generator-original
fix spec for map and array
This commit is contained in:
@@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
@@ -59,38 +59,36 @@ limitations under the License.
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\packages')">..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\packages')">..\..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\packages')">..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\packages')">..\..\packages\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\Newtonsoft.Json.8.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="RestSharp">
|
||||
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\packages')">..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\packages')">..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
||||
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\packages')">..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\packages')">..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="nunit.framework">
|
||||
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\packages')">..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\packages')">..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
||||
<HintPath Condition="Exists('$(SolutionDir)\packages')">$(SolutionDir)\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\packages')">..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\packages')">..\..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
||||
<HintPath Condition="Exists('..\..\vendor')">..\..\vendor\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="**\*.cs" />
|
||||
<Compile Include="**\*.cs"/>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MsBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\IO.Swagger\IO.Swagger.csproj">
|
||||
<Project>{D4DE6CAE-4BE8-4F73-862A-6E6B7DF37446}</Project>
|
||||
<Name>IO.Swagger</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="swagger-logo.png" />
|
||||
<ProjectReference Include="..\IO.Swagger\IO.Swagger.csproj">
|
||||
<Project>{C81D6286-7BA5-4920-8591-F59169CCE4A4}</Project>
|
||||
<Name>IO.Swagger</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ limitations under the License.
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{D4DE6CAE-4BE8-4F73-862A-6E6B7DF37446}</ProjectGuid>
|
||||
<ProjectGuid>{C81D6286-7BA5-4920-8591-F59169CCE4A4}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Swagger Library</RootNamespace>
|
||||
|
||||
@@ -37,15 +37,29 @@ namespace IO.Swagger.Model
|
||||
/// AdditionalPropertiesClass
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class AdditionalPropertiesClass : Dictionary<String, string>, IEquatable<AdditionalPropertiesClass>
|
||||
public partial class AdditionalPropertiesClass : IEquatable<AdditionalPropertiesClass>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AdditionalPropertiesClass" /> class.
|
||||
/// </summary>
|
||||
public AdditionalPropertiesClass()
|
||||
/// <param name="MapProperty">MapProperty.</param>
|
||||
/// <param name="MapOfMapProperty">MapOfMapProperty.</param>
|
||||
public AdditionalPropertiesClass(Dictionary<string, string> MapProperty = null, Dictionary<string, Dictionary<string, string>> MapOfMapProperty = null)
|
||||
{
|
||||
this.MapProperty = MapProperty;
|
||||
this.MapOfMapProperty = MapOfMapProperty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets MapProperty
|
||||
/// </summary>
|
||||
[DataMember(Name="map_property", EmitDefaultValue=false)]
|
||||
public Dictionary<string, string> MapProperty { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or Sets MapOfMapProperty
|
||||
/// </summary>
|
||||
[DataMember(Name="map_of_map_property", EmitDefaultValue=false)]
|
||||
public Dictionary<string, Dictionary<string, string>> MapOfMapProperty { get; set; }
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
@@ -54,6 +68,8 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class AdditionalPropertiesClass {\n");
|
||||
sb.Append(" MapProperty: ").Append(MapProperty).Append("\n");
|
||||
sb.Append(" MapOfMapProperty: ").Append(MapOfMapProperty).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@@ -62,7 +78,7 @@ namespace IO.Swagger.Model
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public new string ToJson()
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
@@ -89,7 +105,17 @@ namespace IO.Swagger.Model
|
||||
if (other == null)
|
||||
return false;
|
||||
|
||||
return false;
|
||||
return
|
||||
(
|
||||
this.MapProperty == other.MapProperty ||
|
||||
this.MapProperty != null &&
|
||||
this.MapProperty.SequenceEqual(other.MapProperty)
|
||||
) &&
|
||||
(
|
||||
this.MapOfMapProperty == other.MapOfMapProperty ||
|
||||
this.MapOfMapProperty != null &&
|
||||
this.MapOfMapProperty.SequenceEqual(other.MapOfMapProperty)
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -103,6 +129,10 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
int hash = 41;
|
||||
// Suitable nullity checks etc, of course :)
|
||||
if (this.MapProperty != null)
|
||||
hash = hash * 59 + this.MapProperty.GetHashCode();
|
||||
if (this.MapOfMapProperty != null)
|
||||
hash = hash * 59 + this.MapOfMapProperty.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,10 +42,31 @@ namespace IO.Swagger.Model
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ArrayTest" /> class.
|
||||
/// </summary>
|
||||
public ArrayTest()
|
||||
/// <param name="ArrayOfString">ArrayOfString.</param>
|
||||
/// <param name="ArrayArrayOfInteger">ArrayArrayOfInteger.</param>
|
||||
/// <param name="ArrayArrayOfModel">ArrayArrayOfModel.</param>
|
||||
public ArrayTest(List<string> ArrayOfString = null, List<List<long?>> ArrayArrayOfInteger = null, List<List<ReadOnlyFirst>> ArrayArrayOfModel = null)
|
||||
{
|
||||
this.ArrayOfString = ArrayOfString;
|
||||
this.ArrayArrayOfInteger = ArrayArrayOfInteger;
|
||||
this.ArrayArrayOfModel = ArrayArrayOfModel;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayOfString
|
||||
/// </summary>
|
||||
[DataMember(Name="array_of_string", EmitDefaultValue=false)]
|
||||
public List<string> ArrayOfString { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayArrayOfInteger
|
||||
/// </summary>
|
||||
[DataMember(Name="array_array_of_integer", EmitDefaultValue=false)]
|
||||
public List<List<long?>> ArrayArrayOfInteger { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or Sets ArrayArrayOfModel
|
||||
/// </summary>
|
||||
[DataMember(Name="array_array_of_model", EmitDefaultValue=false)]
|
||||
public List<List<ReadOnlyFirst>> ArrayArrayOfModel { get; set; }
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
@@ -54,6 +75,9 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class ArrayTest {\n");
|
||||
sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n");
|
||||
sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n");
|
||||
sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@@ -89,7 +113,22 @@ namespace IO.Swagger.Model
|
||||
if (other == null)
|
||||
return false;
|
||||
|
||||
return false;
|
||||
return
|
||||
(
|
||||
this.ArrayOfString == other.ArrayOfString ||
|
||||
this.ArrayOfString != null &&
|
||||
this.ArrayOfString.SequenceEqual(other.ArrayOfString)
|
||||
) &&
|
||||
(
|
||||
this.ArrayArrayOfInteger == other.ArrayArrayOfInteger ||
|
||||
this.ArrayArrayOfInteger != null &&
|
||||
this.ArrayArrayOfInteger.SequenceEqual(other.ArrayArrayOfInteger)
|
||||
) &&
|
||||
(
|
||||
this.ArrayArrayOfModel == other.ArrayArrayOfModel ||
|
||||
this.ArrayArrayOfModel != null &&
|
||||
this.ArrayArrayOfModel.SequenceEqual(other.ArrayArrayOfModel)
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -103,6 +142,12 @@ namespace IO.Swagger.Model
|
||||
{
|
||||
int hash = 41;
|
||||
// Suitable nullity checks etc, of course :)
|
||||
if (this.ArrayOfString != null)
|
||||
hash = hash * 59 + this.ArrayOfString.GetHashCode();
|
||||
if (this.ArrayArrayOfInteger != null)
|
||||
hash = hash * 59 + this.ArrayArrayOfInteger.GetHashCode();
|
||||
if (this.ArrayArrayOfModel != null)
|
||||
hash = hash * 59 + this.ArrayArrayOfModel.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,17 +37,19 @@ namespace IO.Swagger.Model
|
||||
/// MixedPropertiesAndAdditionalPropertiesClass
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class MixedPropertiesAndAdditionalPropertiesClass : Dictionary<String, Animal>, IEquatable<MixedPropertiesAndAdditionalPropertiesClass>
|
||||
public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable<MixedPropertiesAndAdditionalPropertiesClass>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MixedPropertiesAndAdditionalPropertiesClass" /> class.
|
||||
/// </summary>
|
||||
/// <param name="Uuid">Uuid.</param>
|
||||
/// <param name="DateTime">DateTime.</param>
|
||||
public MixedPropertiesAndAdditionalPropertiesClass(Guid? Uuid = null, DateTime? DateTime = null)
|
||||
/// <param name="Map">Map.</param>
|
||||
public MixedPropertiesAndAdditionalPropertiesClass(Guid? Uuid = null, DateTime? DateTime = null, Dictionary<string, Animal> Map = null)
|
||||
{
|
||||
this.Uuid = Uuid;
|
||||
this.DateTime = DateTime;
|
||||
this.Map = Map;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -61,6 +63,11 @@ namespace IO.Swagger.Model
|
||||
[DataMember(Name="dateTime", EmitDefaultValue=false)]
|
||||
public DateTime? DateTime { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or Sets Map
|
||||
/// </summary>
|
||||
[DataMember(Name="map", EmitDefaultValue=false)]
|
||||
public Dictionary<string, Animal> Map { get; set; }
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
@@ -70,6 +77,7 @@ namespace IO.Swagger.Model
|
||||
sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n");
|
||||
sb.Append(" Uuid: ").Append(Uuid).Append("\n");
|
||||
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
||||
sb.Append(" Map: ").Append(Map).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
@@ -78,7 +86,7 @@ namespace IO.Swagger.Model
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public new string ToJson()
|
||||
public string ToJson()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
@@ -115,6 +123,11 @@ namespace IO.Swagger.Model
|
||||
this.DateTime == other.DateTime ||
|
||||
this.DateTime != null &&
|
||||
this.DateTime.Equals(other.DateTime)
|
||||
) &&
|
||||
(
|
||||
this.Map == other.Map ||
|
||||
this.Map != null &&
|
||||
this.Map.SequenceEqual(other.Map)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -133,6 +146,8 @@ namespace IO.Swagger.Model
|
||||
hash = hash * 59 + this.Uuid.GetHashCode();
|
||||
if (this.DateTime != null)
|
||||
hash = hash * 59 + this.DateTime.GetHashCode();
|
||||
if (this.Map != null)
|
||||
hash = hash * 59 + this.Map.GetHashCode();
|
||||
return hash;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user