openapi-generator/samples/client/petstore-security-test/java/okhttp-gson
2017-06-09 16:47:38 +08:00
..
.swagger-codegen Issue5613 (#5616) 2017-06-05 00:38:43 +08:00
docs Fix support for 'class' properties in Java codegen (#4237) 2016-11-23 00:18:40 +08:00
gradle/wrapper better code injection handling for java 2016-06-29 02:00:43 +08:00
src Add JSON-patch as a JSON mime-type (#5764) 2017-06-09 16:47:38 +08:00
.gitignore better code injection handling for java 2016-06-29 02:00:43 +08:00
.swagger-codegen-ignore better code injection handling for java 2016-06-29 02:00:43 +08:00
.travis.yml Fix support for 'class' properties in Java codegen (#4237) 2016-11-23 00:18:40 +08:00
build.gradle Issue 5413 - Use ConstructorBased Injection for ObjectMapper (#5430) 2017-04-25 23:11:18 +08:00
build.sbt better code injection handling for java 2016-06-29 02:00:43 +08:00
git_push.sh better code injection handling for java 2016-06-29 02:00:43 +08:00
gradle.properties better code injection handling for java 2016-06-29 02:00:43 +08:00
gradlew better code injection handling for java 2016-06-29 02:00:43 +08:00
gradlew.bat Fix support for 'class' properties in Java codegen (#4237) 2016-11-23 00:18:40 +08:00
pom.xml [JAVA][#5172] Allow vendor json media types (#5189) 2017-03-30 22:23:24 +08:00
README.md Fix typo (#4956) 2017-03-07 13:49:42 +08:00
settings.gradle better code injection handling for java 2016-06-29 02:00:43 +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