fc01457d77
* [#5172] Allow vendor json media types * Revert unnecessary diffs * Update petstore sample * Didn't run mvn after some edits * Rerun ' ./bin/java-petstore-all.sh' and './bin/security/java-petstore-okhttp-gson.sh' * Added more realistic test cases for isJsonMime |
||
---|---|---|
.. | ||
docs | ||
gradle/wrapper | ||
src | ||
.gitignore | ||
.swagger-codegen-ignore | ||
.travis.yml | ||
build.gradle | ||
build.sbt | ||
git_push.sh | ||
gradle.properties | ||
gradlew | ||
gradlew.bat | ||
pom.xml | ||
README.md | ||
settings.gradle |
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 ' " =end/v2 ' " =end
Class | Method | HTTP request | Description |
---|---|---|---|
FakeApi | testCodeInjectEnd | PUT /fake | To test code injection ' " =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
- Type: OAuth
- Flow: implicit
- Authorization URL: http://petstore.swagger.io/api/oauth/dialog
- Scopes:
- write:pets: modify pets in your account */ ' " =end
- read:pets: read your pets */ ' " =end
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 ' " =end