forked from loafle/openapi-generator-original
[BUG] [Java] Invalid code generation for oneof types. (#18544)
* [BUG] [Java] Invalid code generation for oneof types. #18517 * update samples * [BUG] [Java] Invalid code generation for oneof types. #18517 * [BUG] [Java] Invalid code generation for oneof types. #18517 * [BUG] [Java] Invalid code generation for oneof types. #18544
This commit is contained in:
@@ -4,6 +4,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
| [**fakeGetFreeFormObjectGet**](FakeApi.md#fakeGetFreeFormObjectGet) | **GET** /fake/get-free-form-object | |
|
||||
| [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | |
|
||||
| [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | |
|
||||
| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | |
|
||||
@@ -26,6 +27,64 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**testStringMapReference**](FakeApi.md#testStringMapReference) | **POST** /fake/stringMap-reference | test referenced string map |
|
||||
|
||||
|
||||
<a id="fakeGetFreeFormObjectGet"></a>
|
||||
# **fakeGetFreeFormObjectGet**
|
||||
> FreeFormObjectTestClass fakeGetFreeFormObjectGet()
|
||||
|
||||
|
||||
|
||||
Get a free form object or Json string
|
||||
|
||||
### 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);
|
||||
try {
|
||||
FreeFormObjectTestClass result = apiInstance.fakeGetFreeFormObjectGet();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#fakeGetFreeFormObjectGet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**FreeFormObjectTestClass**](FreeFormObjectTestClass.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | Success | - |
|
||||
|
||||
<a id="fakeOuterBooleanSerialize"></a>
|
||||
# **fakeOuterBooleanSerialize**
|
||||
> Boolean fakeOuterBooleanSerialize(body)
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
# FreeFormObjectTestClass
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**name** | **String** | | [optional] |
|
||||
|**properties** | [**FreeFormObjectTestClassProperties**](FreeFormObjectTestClassProperties.md) | | [optional] |
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# FreeFormObjectTestClassProperties
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user