Andrew Norman 372a08763d adding "Read Timeout" getters and setters for the Jersey and OkHttp (#6853)
* adding "Read Timeout" getters and setters for the Jersey and OkHttp
based ApiClients

adding "Write Timeout" getters and setters for the OkHttp based
ApiClient

adding tests for the OkHttpClient covering the new getters and setters

* generated files from the bin scripts
2017-11-10 12:12:40 +08:00
..
2017-08-15 16:45:03 +08:00
2017-08-15 16:45:03 +08:00
2017-08-15 16:45:03 +08:00
2017-08-15 16:45:03 +08:00
2017-03-07 13:49:42 +08:00

swagger-petstore-okhttp-gson

Requirements

Building the API client library requires Maven to be installed.

Installation

To install the API client library to your local Maven repository, simply execute:

mvn install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn deploy

Refer to the official documentation for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
    <groupId>io.swagger</groupId>
    <artifactId>swagger-petstore-okhttp-gson</artifactId>
    <version>1.0.0</version>
    <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "io.swagger:swagger-petstore-okhttp-gson:1.0.0"

Others

At first generate the JAR by executing:

mvn package

Then manually install the following JARs:

  • target/swagger-petstore-okhttp-gson-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:


import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.FakeApi;

import java.io.File;
import java.util.*;

public class FakeApiExample {

    public static void main(String[] args) {
        
        FakeApi apiInstance = new FakeApi();
        String testCodeInjectEnd = "testCodeInjectEnd_example"; // String | To test code injection  ' \" =end
        try {
            apiInstance.testCodeInjectEnd(testCodeInjectEnd);
        } catch (ApiException e) {
            System.err.println("Exception when calling FakeApi#testCodeInjectEnd");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://petstore.swagger.io ' &quot; =end/v2 ' &quot; =end

Class Method HTTP request Description
FakeApi testCodeInjectEnd PUT /fake To test code injection ' &quot; =end

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

api_key

  • Type: API key
  • API key parameter name: api_key */ ' " =end
  • Location: HTTP header

petstore_auth

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issue.

Author

apiteam@swagger.io ' &quot; =end