Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,12 @@ public Map<String, ModelsMap> postProcessAllModels(Map<String, ModelsMap> objs)
for (CodegenProperty property : model.nonNullableVars) {
patchProperty(enumRefs, model, property);
}

List<CodegenProperty> overriddenProperties = model.vars.stream().filter(v -> model.allVars.stream().anyMatch(a -> a.baseName.equals(v.baseName) && a.dataType != v.dataType)).collect(Collectors.toList());
for (CodegenProperty overridden : overriddenProperties) {
// if the current model overrides an allOf property, use the overridden property
model.allVars.set(model.allVars.indexOf(model.allVars.stream().filter(a -> a.baseName.equals(overridden.baseName)).findFirst().get()), overridden);
}
}
return processed;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2861,3 +2861,30 @@ components:
propertyName: $schema
mapping:
ScopeActivity: '#/components/schemas/CopyActivity'
Result:
type: object
properties:
code:
type: string
description: Result code
uuid:
type: string
description: Result unique identifier
data:
type: object
description: list of named parameters for current message
additionalProperties:
type: string
TestResult:
type: object
allOf:
- $ref: '#/components/schemas/Result'
properties:
code:
$ref: "#/components/schemas/TestResultCode"
TestResultCode:
type: string
description: Result code
enum:
- APPROVED
- MANUAL_APPROVAL_REQUIRED
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ docs/models/RequiredClassRequiredNotnullableEnumString.md
docs/models/RequiredClassRequiredNullableEnumInteger.md
docs/models/RequiredClassRequiredNullableEnumIntegerOnly.md
docs/models/RequiredClassRequiredNullableEnumString.md
docs/models/Result.md
docs/models/Return.md
docs/models/RolesReportsHash.md
docs/models/RolesReportsHashRole.md
Expand All @@ -121,6 +122,8 @@ docs/models/TestEnumParametersEnumQueryIntegerParameter.md
docs/models/TestEnumParametersRequestEnumFormString.md
docs/models/TestEnumParametersRequestEnumFormStringArrayInner.md
docs/models/TestInlineFreeformAdditionalPropertiesRequest.md
docs/models/TestResult.md
docs/models/TestResultCode.md
docs/models/Triangle.md
docs/models/TriangleInterface.md
docs/models/User.md
Expand Down Expand Up @@ -261,6 +264,7 @@ src/Org.OpenAPITools/Model/RequiredClassRequiredNotnullableEnumString.cs
src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumInteger.cs
src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumIntegerOnly.cs
src/Org.OpenAPITools/Model/RequiredClassRequiredNullableEnumString.cs
src/Org.OpenAPITools/Model/Result.cs
src/Org.OpenAPITools/Model/Return.cs
src/Org.OpenAPITools/Model/RolesReportsHash.cs
src/Org.OpenAPITools/Model/RolesReportsHashRole.cs
Expand All @@ -279,6 +283,8 @@ src/Org.OpenAPITools/Model/TestEnumParametersEnumQueryIntegerParameter.cs
src/Org.OpenAPITools/Model/TestEnumParametersRequestEnumFormString.cs
src/Org.OpenAPITools/Model/TestEnumParametersRequestEnumFormStringArrayInner.cs
src/Org.OpenAPITools/Model/TestInlineFreeformAdditionalPropertiesRequest.cs
src/Org.OpenAPITools/Model/TestResult.cs
src/Org.OpenAPITools/Model/TestResultCode.cs
src/Org.OpenAPITools/Model/Triangle.cs
src/Org.OpenAPITools/Model/TriangleInterface.cs
src/Org.OpenAPITools/Model/User.cs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2617,6 +2617,33 @@ components:
required:
- $schema
type: object
Result:
properties:
code:
description: Result code
type: string
uuid:
description: Result unique identifier
type: string
data:
additionalProperties:
type: string
description: list of named parameters for current message
type: object
type: object
TestResult:
allOf:
- $ref: '#/components/schemas/Result'
properties:
code:
$ref: '#/components/schemas/TestResultCode'
type: object
TestResultCode:
description: Result code
enum:
- APPROVED
- MANUAL_APPROVAL_REQUIRED
type: string
_foo_get_default_response:
example:
string:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Org.OpenAPITools.Model.Result

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Code** | **string** | Result code | [optional]
**Data** | **Dictionary&lt;string, string&gt;** | list of named parameters for current message | [optional]
**Uuid** | **string** | Result unique identifier | [optional]

[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Org.OpenAPITools.Model.TestResult

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Code** | **TestResultCode** | | [optional]
**Data** | **Dictionary&lt;string, string&gt;** | list of named parameters for current message | [optional]
**Uuid** | **string** | Result unique identifier | [optional]

[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Org.OpenAPITools.Model.TestResultCode
Result code

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/


using Xunit;

using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;

namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing Result
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class ResultTests : IDisposable
{
// TODO uncomment below to declare an instance variable for Result
//private Result instance;

public ResultTests()
{
// TODO uncomment below to create an instance of Result
//instance = new Result();
}

public void Dispose()
{
// Cleanup when everything is done.
}

/// <summary>
/// Test an instance of Result
/// </summary>
[Fact]
public void ResultInstanceTest()
{
// TODO uncomment below to test "IsType" Result
//Assert.IsType<Result>(instance);
}

/// <summary>
/// Test the property 'Code'
/// </summary>
[Fact]
public void CodeTest()
{
// TODO unit test for the property 'Code'
}

/// <summary>
/// Test the property 'Data'
/// </summary>
[Fact]
public void DataTest()
{
// TODO unit test for the property 'Data'
}

/// <summary>
/// Test the property 'Uuid'
/// </summary>
[Fact]
public void UuidTest()
{
// TODO unit test for the property 'Uuid'
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/


using Xunit;

using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;

namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing TestResultCode
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class TestResultCodeTests : IDisposable
{
// TODO uncomment below to declare an instance variable for TestResultCode
//private TestResultCode instance;

public TestResultCodeTests()
{
// TODO uncomment below to create an instance of TestResultCode
//instance = new TestResultCode();
}

public void Dispose()
{
// Cleanup when everything is done.
}

/// <summary>
/// Test an instance of TestResultCode
/// </summary>
[Fact]
public void TestResultCodeInstanceTest()
{
// TODO uncomment below to test "IsType" TestResultCode
//Assert.IsType<TestResultCode>(instance);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://github.com/openapitools/openapi-generator.git
*/


using Xunit;

using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using Org.OpenAPITools.Model;
using Org.OpenAPITools.Client;
using System.Reflection;

namespace Org.OpenAPITools.Test.Model
{
/// <summary>
/// Class for testing TestResult
/// </summary>
/// <remarks>
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
/// Please update the test case below to test the model.
/// </remarks>
public class TestResultTests : IDisposable
{
// TODO uncomment below to declare an instance variable for TestResult
//private TestResult instance;

public TestResultTests()
{
// TODO uncomment below to create an instance of TestResult
//instance = new TestResult();
}

public void Dispose()
{
// Cleanup when everything is done.
}

/// <summary>
/// Test an instance of TestResult
/// </summary>
[Fact]
public void TestResultInstanceTest()
{
// TODO uncomment below to test "IsType" TestResult
//Assert.IsType<TestResult>(instance);
}

/// <summary>
/// Test the property 'Code'
/// </summary>
[Fact]
public void CodeTest()
{
// TODO unit test for the property 'Code'
}

/// <summary>
/// Test the property 'Data'
/// </summary>
[Fact]
public void DataTest()
{
// TODO unit test for the property 'Data'
}

/// <summary>
/// Test the property 'Uuid'
/// </summary>
[Fact]
public void UuidTest()
{
// TODO unit test for the property 'Uuid'
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ public static string ParameterToString(object obj, string format = ISO8601_DATET
return TestEnumParametersRequestEnumFormStringValueConverter.ToJsonValue(testEnumParametersRequestEnumFormString);
if (obj is TestEnumParametersRequestEnumFormStringArrayInner testEnumParametersRequestEnumFormStringArrayInner)
return TestEnumParametersRequestEnumFormStringArrayInnerValueConverter.ToJsonValue(testEnumParametersRequestEnumFormStringArrayInner);
if (obj is TestResultCode testResultCode)
return TestResultCodeValueConverter.ToJsonValue(testResultCode);
if (obj is ZebraType zebraType)
return ZebraTypeValueConverter.ToJsonValue(zebraType);
if (obj is ZeroBasedEnum zeroBasedEnum)
Expand Down
Loading
Loading