use map/array model class only if it is generated (#17612)

* fix

* tests

* generate samples

* refactor
This commit is contained in:
martin-mfg
2024-01-29 14:35:21 +01:00
committed by GitHub
parent 5055ebade9
commit 9afea50cab
210 changed files with 10550 additions and 6 deletions

View File

@@ -25,6 +25,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
| [**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data |
| [**testNullable**](FakeApi.md#testNullable) | **POST** /fake/nullable | test nullable parent property |
| [**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-parameters | |
| [**testStringMapReference**](FakeApi.md#testStringMapReference) | **POST** /fake/stringMap-reference | test referenced string map |
@@ -1473,3 +1474,68 @@ No authorization required
|-------------|-------------|------------------|
| **200** | Success | - |
## testStringMapReference
> testStringMapReference(requestBody)
test referenced string map
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.FakeApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
Map<String, String> requestBody = new HashMap(); // Map<String, String> | request body
try {
apiInstance.testStringMapReference(requestBody);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testStringMapReference");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **requestBody** | [**Map&lt;String, String&gt;**](String.md)| request body | |
### Return type
null (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 | - |