Skip to content

zubariya/PracticeCodes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started with Swagger Petstore

Introduction

This is a sample server Petstore server. You can find out more about Swagger at http://swagger.io or on irc.freenode.net, #swagger. For this sample, you can use the api key special-key to test the authorization filters.

Find out more about Swagger: http://swagger.io

Install the Package

Install the SDK by adding the following dependency in your project's pom.xml file:

<dependency>
  <groupId>io.github.sufyankhanrao</groupId>
  <artifactId>test-sdk</artifactId>
  <version>1.0.2</version>
</dependency>

You can also view the package at: https://mvnrepository.com/artifact/io.github.sufyankhanrao/test-sdk/1.0.2

Initialize the API Client

Note: Documentation for the client can be found here.

The following parameters are configurable for the API Client:

Parameter Type Description
environment Environment The API environment.
Default: Environment.PRODUCTION
httpClientConfig ReadonlyHttpClientConfiguration Http Client Configuration instance.
apiKey String

The API client can be initialized as follows:

SwaggerPetstoreClient client = new SwaggerPetstoreClient.Builder()
    .httpClientConfig(configBuilder -> configBuilder
            .timeout(0))
    .customHeaderAuthenticationCredentials("api_key")
    .environment(Environment.PRODUCTION)
    .build();

Authorization

This API uses Custom Header Signature.

List of APIs

Classes Documentation

About

Codes of the tutorials that I practiced.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages