mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-05 05:16:11 +00:00
* [BUG][JAVA] oneOf/anyOf multiple constructors with same erasure #18548 * [BUG][JAVA] oneOf/anyOf multiple constructors with same erasure #18548
This commit is contained in:
@@ -4,9 +4,127 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
|------------- | ------------- | -------------|
|
||||
| [**fakeAnyOfWIthSameErasureGet**](DefaultApi.md#fakeAnyOfWIthSameErasureGet) | **GET** /fake/anyOfWIthSameErasure | |
|
||||
| [**fakeOneOfWIthSameErasureGet**](DefaultApi.md#fakeOneOfWIthSameErasureGet) | **GET** /fake/oneOfWIthSameErasure | |
|
||||
| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | |
|
||||
|
||||
|
||||
<a id="fakeAnyOfWIthSameErasureGet"></a>
|
||||
# **fakeAnyOfWIthSameErasureGet**
|
||||
> FakeAnyOfWIthSameErasureGet200Response fakeAnyOfWIthSameErasureGet()
|
||||
|
||||
|
||||
|
||||
Test route, this shouldn't cause a compiler error
|
||||
|
||||
### 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.DefaultApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
DefaultApi apiInstance = new DefaultApi(defaultClient);
|
||||
try {
|
||||
FakeAnyOfWIthSameErasureGet200Response result = apiInstance.fakeAnyOfWIthSameErasureGet();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling DefaultApi#fakeAnyOfWIthSameErasureGet");
|
||||
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
|
||||
|
||||
[**FakeAnyOfWIthSameErasureGet200Response**](FakeAnyOfWIthSameErasureGet200Response.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful response | - |
|
||||
|
||||
<a id="fakeOneOfWIthSameErasureGet"></a>
|
||||
# **fakeOneOfWIthSameErasureGet**
|
||||
> FakeOneOfWIthSameErasureGet200Response fakeOneOfWIthSameErasureGet()
|
||||
|
||||
|
||||
|
||||
Test route, this shouldn't cause a compiler error
|
||||
|
||||
### 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.DefaultApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
DefaultApi apiInstance = new DefaultApi(defaultClient);
|
||||
try {
|
||||
FakeOneOfWIthSameErasureGet200Response result = apiInstance.fakeOneOfWIthSameErasureGet();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling DefaultApi#fakeOneOfWIthSameErasureGet");
|
||||
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
|
||||
|
||||
[**FakeOneOfWIthSameErasureGet200Response**](FakeOneOfWIthSameErasureGet200Response.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful response | - |
|
||||
|
||||
<a id="fooGet"></a>
|
||||
# **fooGet**
|
||||
> FooGetDefaultResponse fooGet()
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# FakeAnyOfWIthSameErasureGet200Response
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
|
||||
# FakeOneOfWIthSameErasureGet200Response
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user