Max cefeded745
[BUG][JAVA] oneOf/anyOf multiple constructors with same erasure #18548 (#18645)
* [BUG][JAVA] oneOf/anyOf multiple constructors with same erasure
#18548

* [BUG][JAVA] oneOf/anyOf multiple constructors with same erasure
#18548
2024-05-13 16:33:49 +08:00

5.2 KiB

DefaultApi

All URIs are relative to http://petstore.swagger.io:80/v2

Method HTTP request Description
fakeAnyOfWIthSameErasureGet GET /fake/anyOfWIthSameErasure
fakeOneOfWIthSameErasureGet GET /fake/oneOfWIthSameErasure
fooGet GET /foo

fakeAnyOfWIthSameErasureGet

FakeAnyOfWIthSameErasureGet200Response fakeAnyOfWIthSameErasureGet()

Test route, this shouldn't cause a compiler error

Example

// 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

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 -

fakeOneOfWIthSameErasureGet

FakeOneOfWIthSameErasureGet200Response fakeOneOfWIthSameErasureGet()

Test route, this shouldn't cause a compiler error

Example

// 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

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 -

fooGet

FooGetDefaultResponse fooGet()

Example

// 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 {
      FooGetDefaultResponse result = apiInstance.fooGet();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling DefaultApi#fooGet");
      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

FooGetDefaultResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
0 response -