William Cheng 550c0781dc
[okhttp-gson-next-gen] new option for error object (#10995)
* add error body and type to api exception class

* add option to specify error object

* add option, update api doc with better error handling

* update samples

* update doc
2021-12-10 02:08:17 +08:00

1.3 KiB

DefaultApi

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

Method HTTP request Description
fooGet GET /foo

fooGet

InlineResponseDefault 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 {
      InlineResponseDefault result = apiInstance.fooGet();
      System.out.println(result);
    } catch (ApiException e) {

    }
  }
}

Parameters

This endpoint does not need any parameter.

Return type

InlineResponseDefault

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
0 response -