3.7 KiB
petstore-okhttp-gson
OpenAPI Petstore *_/ ' " =end -- \r\n \n \r
- API version: 1.0.0 *_/ ' " =end -- \r\n \n \r
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: " \ *_/ ' " =end --
Automatically generated by the OpenAPI Generator
Requirements
Building the API client library requires:
- Java 1.7+
- Maven/Gradle
Installation
To install the API client library to your local Maven repository, simply execute:
mvn clean install
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
mvn clean deploy
Refer to the OSSRH Guide for more information.
Maven users
Add this dependency to your project's POM:
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>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 "org.openapitools:petstore-okhttp-gson:1.0.0"
Others
At first generate the JAR by executing:
mvn clean package
Then manually install the following JARs:
target/petstore-okhttp-gson-1.0.0.jar
target/lib/*.jar
Getting Started
Please follow the installation instruction and execute the following Java code:
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.FakeApi;
import java.io.File;
import java.util.*;
public class FakeApiExample {
public static void main(String[] args) {
FakeApi apiInstance = new FakeApi();
String testCodeInjectStarSlashQuoteDoubleQuoteEqualEndBackSlashRBackSlashNBackSlashNBackSlashR = "testCodeInjectStarSlashQuoteDoubleQuoteEqualEndBackSlashRBackSlashNBackSlashNBackSlashR_example"; // String | To test code injection *_/ ' \\\" =end -- \\\\r\\\\n \\\\n \\\\r
try {
apiInstance.testCodeInjectEndRnNR(testCodeInjectStarSlashQuoteDoubleQuoteEqualEndBackSlashRBackSlashNBackSlashNBackSlashR);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testCodeInjectEndRnNR");
e.printStackTrace();
}
}
}
Documentation for API Endpoints
All URIs are relative to *http://petstore.swagger.io / ' " =end -- \r\n \n \r/v2 */ ' " =end -- \r\n \n \r
Class | Method | HTTP request | Description |
---|---|---|---|
FakeApi | testCodeInjectEndRnNR | PUT /fake | To test code injection *_/ ' " =end -- \r\n \n \r |
Documentation for Models
Documentation for Authorization
Authentication schemes defined for the API:
api_key
- Type: API key
- API key parameter name: api_key */ ' " =end -- \r\n \n \r
- 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 -- \r\n \n \r
- read:pets: read your pets *_/ ' " =end -- \r\n \n \r
Recommendation
It's recommended to create an instance of ApiClient
per thread in a multithreaded environment to avoid any potential issues.
Author
something@something.abc *_/ ' " =end -- \r\n \n \r