Jérémie Bresson 2ee05e12d2 Fixes in security examples (#396)
* Regenerate "samples/client/petstore-security-test/java/okhttp-gson/"

* Use correct jar

* Fix sh scripts

* Fix path: modules/swagger-codegen => modules/openapi-generator/
2018-05-09 18:13:30 +08:00
..
2018-05-08 16:44:51 +08:00
2018-05-09 18:13:30 +08:00
2017-08-15 16:45:03 +08:00
2018-05-09 18:13:30 +08:00

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:

  1. Java 1.7+
  2. 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();
        Object UNKNOWN_BASE_TYPE = new UNKNOWN_BASE_TYPE(); // Object | 
        try {
            apiInstance.testCodeInjectEndRnNR(UNKNOWN_BASE_TYPE);
        } catch (ApiException e) {
            System.err.println("Exception when calling FakeApi#testCodeInjectEndRnNR");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to *petstore.swagger.io / ' &quot; =end -- \r\n \n \r/v2 */ ' &quot; =end -- \r\n \n \r

Class Method HTTP request Description
FakeApi testCodeInjectEndRnNR PUT /fake To test code injection *_/ ' &quot; =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 *_/ ' &quot; =end -- \r\n \n \r
    • read:pets: read your pets *_/ ' &quot; =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 *_/ ' &quot; =end -- \r\n \n \r