fix #17258 - use model class only if it is generated (#17490)

* fix  #16797 and #15796 spring child constructor missing parent params

* root cause and update the DefaultCodegen.java to add missing property when with multi inheritance

* rollback SpringCodegen.java

* update samples

* rollback with master cause #16992 fixed this issue too

* still using orignal design

* catchup master

* catchup master

* catchup master

* fix

* add tests

---------

Co-authored-by: dabdirb <dabdirb@gmail.com>
This commit is contained in:
martin-mfg
2024-01-05 03:30:28 +01:00
committed by GitHub
parent 6317796cba
commit 64f2cad9e8
228 changed files with 10788 additions and 14 deletions

View File

@@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | |
| [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | |
| [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums |
| [**TestAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
| [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | |
| [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | |
| [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \&quot;client\&quot; model |
@@ -547,6 +548,91 @@ No authorization required
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
<a id="testadditionalpropertiesreference"></a>
# **TestAdditionalPropertiesReference**
> void TestAdditionalPropertiesReference (Dictionary<string, Object> requestBody)
test referenced additionalProperties
### Example
```csharp
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class TestAdditionalPropertiesReferenceExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
var apiInstance = new FakeApi(config);
var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> | request body
try
{
// test referenced additionalProperties
apiInstance.TestAdditionalPropertiesReference(requestBody);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReference: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
```
#### Using the TestAdditionalPropertiesReferenceWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
```csharp
try
{
// test referenced additionalProperties
apiInstance.TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
}
catch (ApiException e)
{
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReferenceWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
```
### Parameters
| Name | Type | Description | Notes |
|------|------|-------------|-------|
| **requestBody** | [**Dictionary&lt;string, Object&gt;**](Object.md) | request body | |
### Return type
void (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
<a id="testbodywithfileschema"></a>
# **TestBodyWithFileSchema**
> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)