ryandavis84 6d2d4298df Gatling generator2 issue #6927 (#6934)
* Initial commit, Generates everything necessary to run a performnace test against a swagger api.  Just have to fill out the CSV feeder files with your data.

* adding samples and gatling-petstore.sh file

* Extending the AbstractScalaCodeGen

* Checking in the CodegenConfig file as it is needed to generate

* removing escaped reserved words

* Changed model to be able to make all variables utilize an underscore while json fields are still just the variable name

* Changing underscore to var as interpolation can not start with a _ in scala

* Fixing path params

* allow you to pass in a system property to define which config to use as a workload profile, use rate and instance multipliers to scale up and down your test, added ramp down after the test is completed, added global assertions.

* Addressing PR feedback

* missed semi-colon

* Bringing everything up to date with the renames that were suggested
2018-01-07 17:18:36 +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