forked from loafle/openapi-generator-original
Merge branch 'master' of https://github.com/swagger-api/swagger-codegen
Conflicts: modules/swagger-codegen/src/main/resources/perl/README.mustache samples/client/petstore/perl/README.md samples/client/petstore/perl/lib/WWW/SwaggerClient/Role.pm
This commit is contained in:
commit
78e34bd7c7
@ -20,7 +20,7 @@ public interface {{classname}} extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* {{summary}}
|
* {{summary}}
|
||||||
* {{notes}}
|
* {{notes}}
|
||||||
{{#allParams}} * @param {{paramName}} {{description}}
|
{{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||||
{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
||||||
*/
|
*/
|
||||||
@RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{#hasMore}}&{{/hasMore}}{{/queryParams}}")
|
@RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{#hasMore}}&{{/hasMore}}{{/queryParams}}")
|
||||||
|
@ -23,7 +23,7 @@ public interface {{classname}} {
|
|||||||
* {{summary}}
|
* {{summary}}
|
||||||
* Sync method
|
* Sync method
|
||||||
* {{notes}}
|
* {{notes}}
|
||||||
{{#allParams}} * @param {{paramName}} {{description}}
|
{{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||||
{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
||||||
*/
|
*/
|
||||||
{{#formParams}}{{#-first}}
|
{{#formParams}}{{#-first}}
|
||||||
@ -36,7 +36,7 @@ public interface {{classname}} {
|
|||||||
/**
|
/**
|
||||||
* {{summary}}
|
* {{summary}}
|
||||||
* Async method
|
* Async method
|
||||||
{{#allParams}} * @param {{paramName}} {{description}}
|
{{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||||
{{/allParams}} * @param cb callback method
|
{{/allParams}} * @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
@ -24,7 +24,7 @@ public interface {{classname}} {
|
|||||||
/**
|
/**
|
||||||
* {{summary}}
|
* {{summary}}
|
||||||
* {{notes}}
|
* {{notes}}
|
||||||
{{#allParams}} * @param {{paramName}} {{description}}
|
{{#allParams}} * @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||||
{{/allParams}} * @return Call<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>
|
{{/allParams}} * @return Call<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Object{{/returnType}}>
|
||||||
*/
|
*/
|
||||||
{{#formParams}}{{#-first}}
|
{{#formParams}}{{#-first}}
|
||||||
|
@ -253,14 +253,14 @@ use warnings;
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}{{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}
|
{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}}{{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}
|
||||||
# Configure HTTP basic authorization: {{{name}}}
|
# Configure HTTP basic authorization: {{{name}}}
|
||||||
{{{moduleName}}}::Configuration::username = 'YOUR_USERNAME';
|
${{{moduleName}}}::Configuration::username = 'YOUR_USERNAME';
|
||||||
{{{moduleName}}}::Configuration::password = 'YOUR_PASSWORD';{{/isBasic}}{{#isApiKey}}
|
${{{moduleName}}}::Configuration::password = 'YOUR_PASSWORD';{{/isBasic}}{{#isApiKey}}
|
||||||
# Configure API key authorization: {{{name}}}
|
# Configure API key authorization: {{{name}}}
|
||||||
{{{moduleName}}}::Configuration::api_key->{'{{{keyParamName}}}'} = 'YOUR_API_KEY';
|
${{{moduleName}}}::Configuration::api_key->{'{{{keyParamName}}}'} = 'YOUR_API_KEY';
|
||||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||||
#{{{moduleName}}}::Configuration::api_key_prefix->{'{{{keyParamName}}}'} = 'BEARER';{{/isApiKey}}{{#isOAuth}}
|
#${{{moduleName}}}::Configuration::api_key_prefix->{'{{{keyParamName}}}'} = 'BEARER';{{/isApiKey}}{{#isOAuth}}
|
||||||
# Configure OAuth2 access token for authorization: {{{name}}}
|
# Configure OAuth2 access token for authorization: {{{name}}}
|
||||||
{{{moduleName}}}::Configuration::access_token = 'YOUR_ACCESS_TOKEN';{{/isOAuth}}{{/authMethods}}
|
${{{moduleName}}}::Configuration::access_token = 'YOUR_ACCESS_TOKEN';{{/isOAuth}}{{/authMethods}}
|
||||||
{{/hasAuthMethods}}
|
{{/hasAuthMethods}}
|
||||||
|
|
||||||
my $api_instance = {{moduleName}}::{{classname}}->new();
|
my $api_instance = {{moduleName}}::{{classname}}->new();
|
||||||
|
@ -27,14 +27,14 @@ Method | HTTP request | Description
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
{{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}
|
{{#hasAuthMethods}}{{#authMethods}}{{#isBasic}}
|
||||||
# Configure HTTP basic authorization: {{{name}}}
|
# Configure HTTP basic authorization: {{{name}}}
|
||||||
{{{moduleName}}}::Configuration::username = 'YOUR_USERNAME';
|
${{{moduleName}}}::Configuration::username = 'YOUR_USERNAME';
|
||||||
{{{moduleName}}}::Configuration::password = 'YOUR_PASSWORD';{{/isBasic}}{{#isApiKey}}
|
${{{moduleName}}}::Configuration::password = 'YOUR_PASSWORD';{{/isBasic}}{{#isApiKey}}
|
||||||
# Configure API key authorization: {{{name}}}
|
# Configure API key authorization: {{{name}}}
|
||||||
{{{moduleName}}}::Configuration::api_key->{'{{{keyParamName}}}'} = 'YOUR_API_KEY';
|
${{{moduleName}}}::Configuration::api_key->{'{{{keyParamName}}}'} = 'YOUR_API_KEY';
|
||||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||||
#{{{moduleName}}}::Configuration::api_key_prefix->{'{{{keyParamName}}}'} = "BEARER";{{/isApiKey}}{{#isOAuth}}
|
#${{{moduleName}}}::Configuration::api_key_prefix->{'{{{keyParamName}}}'} = "BEARER";{{/isApiKey}}{{#isOAuth}}
|
||||||
# Configure OAuth2 access token for authorization: {{{name}}}
|
# Configure OAuth2 access token for authorization: {{{name}}}
|
||||||
{{{moduleName}}}::Configuration::access_token = 'YOUR_ACCESS_TOKEN';{{/isOAuth}}{{/authMethods}}
|
${{{moduleName}}}::Configuration::access_token = 'YOUR_ACCESS_TOKEN';{{/isOAuth}}{{/authMethods}}
|
||||||
{{/hasAuthMethods}}
|
{{/hasAuthMethods}}
|
||||||
|
|
||||||
my $api_instance = {{moduleName}}::{{classname}}->new();
|
my $api_instance = {{moduleName}}::{{classname}}->new();
|
||||||
|
12
samples/client/petstore/java/feign/.gitignore
vendored
Normal file
12
samples/client/petstore/java/feign/.gitignore
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
*.class
|
||||||
|
|
||||||
|
# Mobile Tools for Java (J2ME)
|
||||||
|
.mtj.tmp/
|
||||||
|
|
||||||
|
# Package Files #
|
||||||
|
*.jar
|
||||||
|
*.war
|
||||||
|
*.ear
|
||||||
|
|
||||||
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
|
hs_err_pid*
|
52
samples/client/petstore/java/feign/git_push.sh
Normal file
52
samples/client/petstore/java/feign/git_push.sh
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||||
|
#
|
||||||
|
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
||||||
|
|
||||||
|
git_user_id=$1
|
||||||
|
git_repo_id=$2
|
||||||
|
release_note=$3
|
||||||
|
|
||||||
|
if [ "$git_user_id" = "" ]; then
|
||||||
|
git_user_id="YOUR_GIT_USR_ID"
|
||||||
|
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$git_repo_id" = "" ]; then
|
||||||
|
git_repo_id="YOUR_GIT_REPO_ID"
|
||||||
|
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$release_note" = "" ]; then
|
||||||
|
release_note="Minor update"
|
||||||
|
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Initialize the local directory as a Git repository
|
||||||
|
git init
|
||||||
|
|
||||||
|
# Adds the files in the local repository and stages them for commit.
|
||||||
|
git add .
|
||||||
|
|
||||||
|
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||||
|
git commit -m "$release_note"
|
||||||
|
|
||||||
|
# Sets the new remote
|
||||||
|
git_remote=`git remote`
|
||||||
|
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||||
|
|
||||||
|
if [ "$GIT_TOKEN" = "" ]; then
|
||||||
|
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||||
|
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||||
|
else
|
||||||
|
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
git pull origin master
|
||||||
|
|
||||||
|
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||||
|
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
||||||
|
git push origin master 2>&1 | grep -v 'To https'
|
||||||
|
|
@ -6,20 +6,23 @@ import io.swagger.client.model.Pet;
|
|||||||
import io.swagger.client.model.InlineResponse200;
|
import io.swagger.client.model.InlineResponse200;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import feign.*;
|
import feign.*;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
|
||||||
public interface PetApi extends ApiClient.Api {
|
public interface PetApi extends ApiClient.Api {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new pet to the store
|
* Add a new pet to the store
|
||||||
*
|
*
|
||||||
* @param body Pet object that needs to be added to the store
|
* @param body Pet object that needs to be added to the store (optional)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@RequestLine("POST /pet")
|
@RequestLine("POST /pet")
|
||||||
@ -32,7 +35,7 @@ public interface PetApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||||
*
|
*
|
||||||
* @param body Pet object in the form of byte array
|
* @param body Pet object in the form of byte array (optional)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@RequestLine("POST /pet?testing_byte_array=true")
|
@RequestLine("POST /pet?testing_byte_array=true")
|
||||||
@ -45,8 +48,8 @@ public interface PetApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Deletes a pet
|
* Deletes a pet
|
||||||
*
|
*
|
||||||
* @param petId Pet id to delete
|
* @param petId Pet id to delete (required)
|
||||||
* @param apiKey
|
* @param apiKey (optional)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@RequestLine("DELETE /pet/{petId}")
|
@RequestLine("DELETE /pet/{petId}")
|
||||||
@ -60,7 +63,7 @@ public interface PetApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Finds Pets by status
|
* Finds Pets by status
|
||||||
* Multiple status values can be provided with comma separated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
* @param status Status values that need to be considered for query
|
* @param status Status values that need to be considered for query (optional, default to available)
|
||||||
* @return List<Pet>
|
* @return List<Pet>
|
||||||
*/
|
*/
|
||||||
@RequestLine("GET /pet/findByStatus?status={status}")
|
@RequestLine("GET /pet/findByStatus?status={status}")
|
||||||
@ -73,7 +76,7 @@ public interface PetApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Finds Pets by tags
|
* Finds Pets by tags
|
||||||
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||||
* @param tags Tags to filter by
|
* @param tags Tags to filter by (optional)
|
||||||
* @return List<Pet>
|
* @return List<Pet>
|
||||||
*/
|
*/
|
||||||
@RequestLine("GET /pet/findByTags?tags={tags}")
|
@RequestLine("GET /pet/findByTags?tags={tags}")
|
||||||
@ -86,7 +89,7 @@ public interface PetApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Find pet by ID
|
* Find pet by ID
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched (required)
|
||||||
* @return Pet
|
* @return Pet
|
||||||
*/
|
*/
|
||||||
@RequestLine("GET /pet/{petId}")
|
@RequestLine("GET /pet/{petId}")
|
||||||
@ -99,7 +102,7 @@ public interface PetApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched (required)
|
||||||
* @return InlineResponse200
|
* @return InlineResponse200
|
||||||
*/
|
*/
|
||||||
@RequestLine("GET /pet/{petId}?response=inline_arbitrary_object")
|
@RequestLine("GET /pet/{petId}?response=inline_arbitrary_object")
|
||||||
@ -112,7 +115,7 @@ public interface PetApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Fake endpoint to test byte array return by 'Find pet by ID'
|
* Fake endpoint to test byte array return by 'Find pet by ID'
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched (required)
|
||||||
* @return byte[]
|
* @return byte[]
|
||||||
*/
|
*/
|
||||||
@RequestLine("GET /pet/{petId}?testing_byte_array=true")
|
@RequestLine("GET /pet/{petId}?testing_byte_array=true")
|
||||||
@ -125,7 +128,7 @@ public interface PetApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Update an existing pet
|
* Update an existing pet
|
||||||
*
|
*
|
||||||
* @param body Pet object that needs to be added to the store
|
* @param body Pet object that needs to be added to the store (optional)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@RequestLine("PUT /pet")
|
@RequestLine("PUT /pet")
|
||||||
@ -138,9 +141,9 @@ public interface PetApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Updates a pet in the store with form data
|
* Updates a pet in the store with form data
|
||||||
*
|
*
|
||||||
* @param petId ID of pet that needs to be updated
|
* @param petId ID of pet that needs to be updated (required)
|
||||||
* @param name Updated name of the pet
|
* @param name Updated name of the pet (optional)
|
||||||
* @param status Updated status of the pet
|
* @param status Updated status of the pet (optional)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@RequestLine("POST /pet/{petId}")
|
@RequestLine("POST /pet/{petId}")
|
||||||
@ -153,9 +156,9 @@ public interface PetApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* uploads an image
|
* uploads an image
|
||||||
*
|
*
|
||||||
* @param petId ID of pet to update
|
* @param petId ID of pet to update (required)
|
||||||
* @param additionalMetadata Additional data to pass to server
|
* @param additionalMetadata Additional data to pass to server (optional)
|
||||||
* @param file file to upload
|
* @param file file to upload (optional)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@RequestLine("POST /pet/{petId}/uploadImage")
|
@RequestLine("POST /pet/{petId}/uploadImage")
|
||||||
@ -165,4 +168,5 @@ public interface PetApi extends ApiClient.Api {
|
|||||||
})
|
})
|
||||||
void uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
|
void uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,20 +4,23 @@ import io.swagger.client.ApiClient;
|
|||||||
|
|
||||||
import io.swagger.client.model.Order;
|
import io.swagger.client.model.Order;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import feign.*;
|
import feign.*;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
|
||||||
public interface StoreApi extends ApiClient.Api {
|
public interface StoreApi extends ApiClient.Api {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete purchase order by ID
|
* Delete purchase order by ID
|
||||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
* @param orderId ID of the order that needs to be deleted
|
* @param orderId ID of the order that needs to be deleted (required)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@RequestLine("DELETE /store/order/{orderId}")
|
@RequestLine("DELETE /store/order/{orderId}")
|
||||||
@ -30,7 +33,7 @@ public interface StoreApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Finds orders by status
|
* Finds orders by status
|
||||||
* A single status value can be provided as a string
|
* A single status value can be provided as a string
|
||||||
* @param status Status value that needs to be considered for query
|
* @param status Status value that needs to be considered for query (optional, default to placed)
|
||||||
* @return List<Order>
|
* @return List<Order>
|
||||||
*/
|
*/
|
||||||
@RequestLine("GET /store/findByStatus?status={status}")
|
@RequestLine("GET /store/findByStatus?status={status}")
|
||||||
@ -67,7 +70,7 @@ public interface StoreApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Find purchase order by ID
|
* Find purchase order by ID
|
||||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
* @param orderId ID of pet that needs to be fetched
|
* @param orderId ID of pet that needs to be fetched (required)
|
||||||
* @return Order
|
* @return Order
|
||||||
*/
|
*/
|
||||||
@RequestLine("GET /store/order/{orderId}")
|
@RequestLine("GET /store/order/{orderId}")
|
||||||
@ -80,7 +83,7 @@ public interface StoreApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
*
|
*
|
||||||
* @param body order placed for purchasing the pet
|
* @param body order placed for purchasing the pet (optional)
|
||||||
* @return Order
|
* @return Order
|
||||||
*/
|
*/
|
||||||
@RequestLine("POST /store/order")
|
@RequestLine("POST /store/order")
|
||||||
@ -90,4 +93,5 @@ public interface StoreApi extends ApiClient.Api {
|
|||||||
})
|
})
|
||||||
Order placeOrder(Order body);
|
Order placeOrder(Order body);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,20 +4,23 @@ import io.swagger.client.ApiClient;
|
|||||||
|
|
||||||
import io.swagger.client.model.User;
|
import io.swagger.client.model.User;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import feign.*;
|
import feign.*;
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
|
||||||
public interface UserApi extends ApiClient.Api {
|
public interface UserApi extends ApiClient.Api {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create user
|
* Create user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param body Created user object
|
* @param body Created user object (optional)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@RequestLine("POST /user")
|
@RequestLine("POST /user")
|
||||||
@ -30,7 +33,7 @@ public interface UserApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param body List of user object
|
* @param body List of user object (optional)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@RequestLine("POST /user/createWithArray")
|
@RequestLine("POST /user/createWithArray")
|
||||||
@ -43,7 +46,7 @@ public interface UserApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param body List of user object
|
* @param body List of user object (optional)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@RequestLine("POST /user/createWithList")
|
@RequestLine("POST /user/createWithList")
|
||||||
@ -56,7 +59,7 @@ public interface UserApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Delete user
|
* Delete user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param username The name that needs to be deleted
|
* @param username The name that needs to be deleted (required)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@RequestLine("DELETE /user/{username}")
|
@RequestLine("DELETE /user/{username}")
|
||||||
@ -69,7 +72,7 @@ public interface UserApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||||
* @return User
|
* @return User
|
||||||
*/
|
*/
|
||||||
@RequestLine("GET /user/{username}")
|
@RequestLine("GET /user/{username}")
|
||||||
@ -82,8 +85,8 @@ public interface UserApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Logs user into the system
|
* Logs user into the system
|
||||||
*
|
*
|
||||||
* @param username The user name for login
|
* @param username The user name for login (optional)
|
||||||
* @param password The password for login in clear text
|
* @param password The password for login in clear text (optional)
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
@RequestLine("GET /user/login?username={username}&password={password}")
|
@RequestLine("GET /user/login?username={username}&password={password}")
|
||||||
@ -108,8 +111,8 @@ public interface UserApi extends ApiClient.Api {
|
|||||||
/**
|
/**
|
||||||
* Updated user
|
* Updated user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param username name that need to be deleted
|
* @param username name that need to be deleted (required)
|
||||||
* @param body Updated user object
|
* @param body Updated user object (optional)
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@RequestLine("PUT /user/{username}")
|
@RequestLine("PUT /user/{username}")
|
||||||
@ -119,4 +122,5 @@ public interface UserApi extends ApiClient.Api {
|
|||||||
})
|
})
|
||||||
void updateUser(@Param("username") String username, User body);
|
void updateUser(@Param("username") String username, User body);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,12 +13,16 @@ import java.util.List;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
|
|
||||||
|
|
||||||
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
|
||||||
public class InlineResponse200 {
|
public class InlineResponse200 {
|
||||||
|
|
||||||
private List<Tag> tags = new ArrayList<Tag>();
|
private List<String> photoUrls = new ArrayList<String>();
|
||||||
|
private String name = null;
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
private Object category = null;
|
private Object category = null;
|
||||||
|
private List<Tag> tags = new ArrayList<Tag>();
|
||||||
|
|
||||||
|
|
||||||
public enum StatusEnum {
|
public enum StatusEnum {
|
||||||
@ -40,24 +44,39 @@ public class InlineResponse200 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
private String name = null;
|
|
||||||
private List<String> photoUrls = new ArrayList<String>();
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
public InlineResponse200 tags(List<Tag> tags) {
|
public InlineResponse200 photoUrls(List<String> photoUrls) {
|
||||||
this.tags = tags;
|
this.photoUrls = photoUrls;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "")
|
@ApiModelProperty(example = "null", value = "")
|
||||||
@JsonProperty("tags")
|
@JsonProperty("photoUrls")
|
||||||
public List<Tag> getTags() {
|
public List<String> getPhotoUrls() {
|
||||||
return tags;
|
return photoUrls;
|
||||||
}
|
}
|
||||||
public void setTags(List<Tag> tags) {
|
public void setPhotoUrls(List<String> photoUrls) {
|
||||||
this.tags = tags;
|
this.photoUrls = photoUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
public InlineResponse200 name(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiModelProperty(example = "doggie", value = "")
|
||||||
|
@JsonProperty("name")
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -95,6 +114,23 @@ public class InlineResponse200 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
public InlineResponse200 tags(List<Tag> tags) {
|
||||||
|
this.tags = tags;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiModelProperty(example = "null", value = "")
|
||||||
|
@JsonProperty("tags")
|
||||||
|
public List<Tag> getTags() {
|
||||||
|
return tags;
|
||||||
|
}
|
||||||
|
public void setTags(List<Tag> tags) {
|
||||||
|
this.tags = tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pet status in the store
|
* pet status in the store
|
||||||
**/
|
**/
|
||||||
@ -113,40 +149,6 @@ public class InlineResponse200 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
**/
|
|
||||||
public InlineResponse200 name(String name) {
|
|
||||||
this.name = name;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiModelProperty(example = "doggie", value = "")
|
|
||||||
@JsonProperty("name")
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
**/
|
|
||||||
public InlineResponse200 photoUrls(List<String> photoUrls) {
|
|
||||||
this.photoUrls = photoUrls;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiModelProperty(example = "null", value = "")
|
|
||||||
@JsonProperty("photoUrls")
|
|
||||||
public List<String> getPhotoUrls() {
|
|
||||||
return photoUrls;
|
|
||||||
}
|
|
||||||
public void setPhotoUrls(List<String> photoUrls) {
|
|
||||||
this.photoUrls = photoUrls;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
@ -157,17 +159,17 @@ public class InlineResponse200 {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
|
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
|
||||||
return Objects.equals(this.tags, inlineResponse200.tags) &&
|
return Objects.equals(this.photoUrls, inlineResponse200.photoUrls) &&
|
||||||
|
Objects.equals(this.name, inlineResponse200.name) &&
|
||||||
Objects.equals(this.id, inlineResponse200.id) &&
|
Objects.equals(this.id, inlineResponse200.id) &&
|
||||||
Objects.equals(this.category, inlineResponse200.category) &&
|
Objects.equals(this.category, inlineResponse200.category) &&
|
||||||
Objects.equals(this.status, inlineResponse200.status) &&
|
Objects.equals(this.tags, inlineResponse200.tags) &&
|
||||||
Objects.equals(this.name, inlineResponse200.name) &&
|
Objects.equals(this.status, inlineResponse200.status);
|
||||||
Objects.equals(this.photoUrls, inlineResponse200.photoUrls);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(tags, id, category, status, name, photoUrls);
|
return Objects.hash(photoUrls, name, id, category, tags, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -175,12 +177,12 @@ public class InlineResponse200 {
|
|||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("class InlineResponse200 {\n");
|
sb.append("class InlineResponse200 {\n");
|
||||||
|
|
||||||
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
|
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
sb.append(" category: ").append(toIndentedString(category)).append("\n");
|
sb.append(" category: ").append(toIndentedString(category)).append("\n");
|
||||||
|
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
|
||||||
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
||||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
|
||||||
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
|
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
@ -197,3 +199,5 @@ public class InlineResponse200 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,78 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
|
||||||
|
public class Model200Response {
|
||||||
|
|
||||||
|
private Integer name = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
public Model200Response name(Integer name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiModelProperty(example = "null", value = "")
|
||||||
|
@JsonProperty("name")
|
||||||
|
public Integer getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(Integer name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Model200Response _200Response = (Model200Response) o;
|
||||||
|
return Objects.equals(this.name, _200Response.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Model200Response {\n");
|
||||||
|
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,78 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
|
||||||
|
public class ModelReturn {
|
||||||
|
|
||||||
|
private Integer _return = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
public ModelReturn _return(Integer _return) {
|
||||||
|
this._return = _return;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiModelProperty(example = "null", value = "")
|
||||||
|
@JsonProperty("return")
|
||||||
|
public Integer getReturn() {
|
||||||
|
return _return;
|
||||||
|
}
|
||||||
|
public void setReturn(Integer _return) {
|
||||||
|
this._return = _return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ModelReturn _return = (ModelReturn) o;
|
||||||
|
return Objects.equals(this._return, _return._return);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(_return);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class ModelReturn {\n");
|
||||||
|
|
||||||
|
sb.append(" _return: ").append(toIndentedString(_return)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,98 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
|
||||||
|
public class Name {
|
||||||
|
|
||||||
|
private Integer name = null;
|
||||||
|
private Integer snakeCase = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
public Name name(Integer name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiModelProperty(example = "null", value = "")
|
||||||
|
@JsonProperty("name")
|
||||||
|
public Integer getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(Integer name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
public Name snakeCase(Integer snakeCase) {
|
||||||
|
this.snakeCase = snakeCase;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiModelProperty(example = "null", value = "")
|
||||||
|
@JsonProperty("snake_case")
|
||||||
|
public Integer getSnakeCase() {
|
||||||
|
return snakeCase;
|
||||||
|
}
|
||||||
|
public void setSnakeCase(Integer snakeCase) {
|
||||||
|
this.snakeCase = snakeCase;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Name name = (Name) o;
|
||||||
|
return Objects.equals(this.name, name.name) &&
|
||||||
|
Objects.equals(this.snakeCase, name.snakeCase);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(name, snakeCase);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Name {\n");
|
||||||
|
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,78 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
|
||||||
|
public class SpecialModelName {
|
||||||
|
|
||||||
|
private Long specialPropertyName = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
public SpecialModelName specialPropertyName(Long specialPropertyName) {
|
||||||
|
this.specialPropertyName = specialPropertyName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiModelProperty(example = "null", value = "")
|
||||||
|
@JsonProperty("$special[property.name]")
|
||||||
|
public Long getSpecialPropertyName() {
|
||||||
|
return specialPropertyName;
|
||||||
|
}
|
||||||
|
public void setSpecialPropertyName(Long specialPropertyName) {
|
||||||
|
this.specialPropertyName = specialPropertyName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
SpecialModelName specialModelName = (SpecialModelName) o;
|
||||||
|
return Objects.equals(this.specialPropertyName, specialModelName.specialPropertyName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(specialPropertyName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class SpecialModelName {\n");
|
||||||
|
|
||||||
|
sb.append(" specialPropertyName: ").append(toIndentedString(specialPropertyName)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(java.lang.Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
12
samples/client/petstore/java/retrofit/.gitignore
vendored
Normal file
12
samples/client/petstore/java/retrofit/.gitignore
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
*.class
|
||||||
|
|
||||||
|
# Mobile Tools for Java (J2ME)
|
||||||
|
.mtj.tmp/
|
||||||
|
|
||||||
|
# Package Files #
|
||||||
|
*.jar
|
||||||
|
*.war
|
||||||
|
*.ear
|
||||||
|
|
||||||
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
|
hs_err_pid*
|
52
samples/client/petstore/java/retrofit/git_push.sh
Normal file
52
samples/client/petstore/java/retrofit/git_push.sh
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||||
|
#
|
||||||
|
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
||||||
|
|
||||||
|
git_user_id=$1
|
||||||
|
git_repo_id=$2
|
||||||
|
release_note=$3
|
||||||
|
|
||||||
|
if [ "$git_user_id" = "" ]; then
|
||||||
|
git_user_id="YOUR_GIT_USR_ID"
|
||||||
|
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$git_repo_id" = "" ]; then
|
||||||
|
git_repo_id="YOUR_GIT_REPO_ID"
|
||||||
|
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$release_note" = "" ]; then
|
||||||
|
release_note="Minor update"
|
||||||
|
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Initialize the local directory as a Git repository
|
||||||
|
git init
|
||||||
|
|
||||||
|
# Adds the files in the local repository and stages them for commit.
|
||||||
|
git add .
|
||||||
|
|
||||||
|
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||||
|
git commit -m "$release_note"
|
||||||
|
|
||||||
|
# Sets the new remote
|
||||||
|
git_remote=`git remote`
|
||||||
|
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||||
|
|
||||||
|
if [ "$GIT_TOKEN" = "" ]; then
|
||||||
|
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||||
|
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||||
|
else
|
||||||
|
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
git pull origin master
|
||||||
|
|
||||||
|
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||||
|
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
||||||
|
git push origin master 2>&1 | grep -v 'To https'
|
||||||
|
|
@ -10,18 +10,22 @@ import io.swagger.client.model.Pet;
|
|||||||
import io.swagger.client.model.InlineResponse200;
|
import io.swagger.client.model.InlineResponse200;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface PetApi {
|
public interface PetApi {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new pet to the store
|
* Add a new pet to the store
|
||||||
* Sync method
|
* Sync method
|
||||||
*
|
*
|
||||||
* @param body Pet object that needs to be added to the store
|
* @param body Pet object that needs to be added to the store (optional)
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -33,7 +37,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Add a new pet to the store
|
* Add a new pet to the store
|
||||||
* Async method
|
* Async method
|
||||||
* @param body Pet object that needs to be added to the store
|
* @param body Pet object that needs to be added to the store (optional)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -47,7 +51,7 @@ public interface PetApi {
|
|||||||
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||||
* Sync method
|
* Sync method
|
||||||
*
|
*
|
||||||
* @param body Pet object in the form of byte array
|
* @param body Pet object in the form of byte array (optional)
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -59,7 +63,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||||
* Async method
|
* Async method
|
||||||
* @param body Pet object in the form of byte array
|
* @param body Pet object in the form of byte array (optional)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -73,8 +77,8 @@ public interface PetApi {
|
|||||||
* Deletes a pet
|
* Deletes a pet
|
||||||
* Sync method
|
* Sync method
|
||||||
*
|
*
|
||||||
* @param petId Pet id to delete
|
* @param petId Pet id to delete (required)
|
||||||
* @param apiKey
|
* @param apiKey (optional)
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -86,8 +90,8 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Deletes a pet
|
* Deletes a pet
|
||||||
* Async method
|
* Async method
|
||||||
* @param petId Pet id to delete
|
* @param petId Pet id to delete (required)
|
||||||
* @param apiKey
|
* @param apiKey (optional)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -101,7 +105,7 @@ public interface PetApi {
|
|||||||
* Finds Pets by status
|
* Finds Pets by status
|
||||||
* Sync method
|
* Sync method
|
||||||
* Multiple status values can be provided with comma separated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
* @param status Status values that need to be considered for query
|
* @param status Status values that need to be considered for query (optional, default to available)
|
||||||
* @return List<Pet>
|
* @return List<Pet>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -113,7 +117,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Finds Pets by status
|
* Finds Pets by status
|
||||||
* Async method
|
* Async method
|
||||||
* @param status Status values that need to be considered for query
|
* @param status Status values that need to be considered for query (optional, default to available)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -127,7 +131,7 @@ public interface PetApi {
|
|||||||
* Finds Pets by tags
|
* Finds Pets by tags
|
||||||
* Sync method
|
* Sync method
|
||||||
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||||
* @param tags Tags to filter by
|
* @param tags Tags to filter by (optional)
|
||||||
* @return List<Pet>
|
* @return List<Pet>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -139,7 +143,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Finds Pets by tags
|
* Finds Pets by tags
|
||||||
* Async method
|
* Async method
|
||||||
* @param tags Tags to filter by
|
* @param tags Tags to filter by (optional)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -153,7 +157,7 @@ public interface PetApi {
|
|||||||
* Find pet by ID
|
* Find pet by ID
|
||||||
* Sync method
|
* Sync method
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched (required)
|
||||||
* @return Pet
|
* @return Pet
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -165,7 +169,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Find pet by ID
|
* Find pet by ID
|
||||||
* Async method
|
* Async method
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched (required)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -179,7 +183,7 @@ public interface PetApi {
|
|||||||
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||||
* Sync method
|
* Sync method
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched (required)
|
||||||
* @return InlineResponse200
|
* @return InlineResponse200
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -191,7 +195,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||||
* Async method
|
* Async method
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched (required)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -205,7 +209,7 @@ public interface PetApi {
|
|||||||
* Fake endpoint to test byte array return by 'Find pet by ID'
|
* Fake endpoint to test byte array return by 'Find pet by ID'
|
||||||
* Sync method
|
* Sync method
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched (required)
|
||||||
* @return byte[]
|
* @return byte[]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -217,7 +221,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Fake endpoint to test byte array return by 'Find pet by ID'
|
* Fake endpoint to test byte array return by 'Find pet by ID'
|
||||||
* Async method
|
* Async method
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched (required)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -231,7 +235,7 @@ public interface PetApi {
|
|||||||
* Update an existing pet
|
* Update an existing pet
|
||||||
* Sync method
|
* Sync method
|
||||||
*
|
*
|
||||||
* @param body Pet object that needs to be added to the store
|
* @param body Pet object that needs to be added to the store (optional)
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -243,7 +247,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Update an existing pet
|
* Update an existing pet
|
||||||
* Async method
|
* Async method
|
||||||
* @param body Pet object that needs to be added to the store
|
* @param body Pet object that needs to be added to the store (optional)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -257,9 +261,9 @@ public interface PetApi {
|
|||||||
* Updates a pet in the store with form data
|
* Updates a pet in the store with form data
|
||||||
* Sync method
|
* Sync method
|
||||||
*
|
*
|
||||||
* @param petId ID of pet that needs to be updated
|
* @param petId ID of pet that needs to be updated (required)
|
||||||
* @param name Updated name of the pet
|
* @param name Updated name of the pet (optional)
|
||||||
* @param status Updated status of the pet
|
* @param status Updated status of the pet (optional)
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -272,9 +276,9 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Updates a pet in the store with form data
|
* Updates a pet in the store with form data
|
||||||
* Async method
|
* Async method
|
||||||
* @param petId ID of pet that needs to be updated
|
* @param petId ID of pet that needs to be updated (required)
|
||||||
* @param name Updated name of the pet
|
* @param name Updated name of the pet (optional)
|
||||||
* @param status Updated status of the pet
|
* @param status Updated status of the pet (optional)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -289,9 +293,9 @@ public interface PetApi {
|
|||||||
* uploads an image
|
* uploads an image
|
||||||
* Sync method
|
* Sync method
|
||||||
*
|
*
|
||||||
* @param petId ID of pet to update
|
* @param petId ID of pet to update (required)
|
||||||
* @param additionalMetadata Additional data to pass to server
|
* @param additionalMetadata Additional data to pass to server (optional)
|
||||||
* @param file file to upload
|
* @param file file to upload (optional)
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -304,9 +308,9 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* uploads an image
|
* uploads an image
|
||||||
* Async method
|
* Async method
|
||||||
* @param petId ID of pet to update
|
* @param petId ID of pet to update (required)
|
||||||
* @param additionalMetadata Additional data to pass to server
|
* @param additionalMetadata Additional data to pass to server (optional)
|
||||||
* @param file file to upload
|
* @param file file to upload (optional)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -318,3 +322,4 @@ public interface PetApi {
|
|||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,18 +8,22 @@ import retrofit.mime.*;
|
|||||||
|
|
||||||
import io.swagger.client.model.Order;
|
import io.swagger.client.model.Order;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface StoreApi {
|
public interface StoreApi {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete purchase order by ID
|
* Delete purchase order by ID
|
||||||
* Sync method
|
* Sync method
|
||||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
* @param orderId ID of the order that needs to be deleted
|
* @param orderId ID of the order that needs to be deleted (required)
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -31,7 +35,7 @@ public interface StoreApi {
|
|||||||
/**
|
/**
|
||||||
* Delete purchase order by ID
|
* Delete purchase order by ID
|
||||||
* Async method
|
* Async method
|
||||||
* @param orderId ID of the order that needs to be deleted
|
* @param orderId ID of the order that needs to be deleted (required)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -45,7 +49,7 @@ public interface StoreApi {
|
|||||||
* Finds orders by status
|
* Finds orders by status
|
||||||
* Sync method
|
* Sync method
|
||||||
* A single status value can be provided as a string
|
* A single status value can be provided as a string
|
||||||
* @param status Status value that needs to be considered for query
|
* @param status Status value that needs to be considered for query (optional, default to placed)
|
||||||
* @return List<Order>
|
* @return List<Order>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -57,7 +61,7 @@ public interface StoreApi {
|
|||||||
/**
|
/**
|
||||||
* Finds orders by status
|
* Finds orders by status
|
||||||
* Async method
|
* Async method
|
||||||
* @param status Status value that needs to be considered for query
|
* @param status Status value that needs to be considered for query (optional, default to placed)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -117,7 +121,7 @@ public interface StoreApi {
|
|||||||
* Find purchase order by ID
|
* Find purchase order by ID
|
||||||
* Sync method
|
* Sync method
|
||||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
* @param orderId ID of pet that needs to be fetched
|
* @param orderId ID of pet that needs to be fetched (required)
|
||||||
* @return Order
|
* @return Order
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -129,7 +133,7 @@ public interface StoreApi {
|
|||||||
/**
|
/**
|
||||||
* Find purchase order by ID
|
* Find purchase order by ID
|
||||||
* Async method
|
* Async method
|
||||||
* @param orderId ID of pet that needs to be fetched
|
* @param orderId ID of pet that needs to be fetched (required)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -143,7 +147,7 @@ public interface StoreApi {
|
|||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
* Sync method
|
* Sync method
|
||||||
*
|
*
|
||||||
* @param body order placed for purchasing the pet
|
* @param body order placed for purchasing the pet (optional)
|
||||||
* @return Order
|
* @return Order
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -155,7 +159,7 @@ public interface StoreApi {
|
|||||||
/**
|
/**
|
||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
* Async method
|
* Async method
|
||||||
* @param body order placed for purchasing the pet
|
* @param body order placed for purchasing the pet (optional)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -166,3 +170,4 @@ public interface StoreApi {
|
|||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,18 +8,22 @@ import retrofit.mime.*;
|
|||||||
|
|
||||||
import io.swagger.client.model.User;
|
import io.swagger.client.model.User;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface UserApi {
|
public interface UserApi {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create user
|
* Create user
|
||||||
* Sync method
|
* Sync method
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param body Created user object
|
* @param body Created user object (optional)
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -31,7 +35,7 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Create user
|
* Create user
|
||||||
* Async method
|
* Async method
|
||||||
* @param body Created user object
|
* @param body Created user object (optional)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -45,7 +49,7 @@ public interface UserApi {
|
|||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
* Sync method
|
* Sync method
|
||||||
*
|
*
|
||||||
* @param body List of user object
|
* @param body List of user object (optional)
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -57,7 +61,7 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
* Async method
|
* Async method
|
||||||
* @param body List of user object
|
* @param body List of user object (optional)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -71,7 +75,7 @@ public interface UserApi {
|
|||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
* Sync method
|
* Sync method
|
||||||
*
|
*
|
||||||
* @param body List of user object
|
* @param body List of user object (optional)
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -83,7 +87,7 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
* Async method
|
* Async method
|
||||||
* @param body List of user object
|
* @param body List of user object (optional)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -97,7 +101,7 @@ public interface UserApi {
|
|||||||
* Delete user
|
* Delete user
|
||||||
* Sync method
|
* Sync method
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param username The name that needs to be deleted
|
* @param username The name that needs to be deleted (required)
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -109,7 +113,7 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Delete user
|
* Delete user
|
||||||
* Async method
|
* Async method
|
||||||
* @param username The name that needs to be deleted
|
* @param username The name that needs to be deleted (required)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -123,7 +127,7 @@ public interface UserApi {
|
|||||||
* Get user by user name
|
* Get user by user name
|
||||||
* Sync method
|
* Sync method
|
||||||
*
|
*
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||||
* @return User
|
* @return User
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -135,7 +139,7 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
* Async method
|
* Async method
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -149,8 +153,8 @@ public interface UserApi {
|
|||||||
* Logs user into the system
|
* Logs user into the system
|
||||||
* Sync method
|
* Sync method
|
||||||
*
|
*
|
||||||
* @param username The user name for login
|
* @param username The user name for login (optional)
|
||||||
* @param password The password for login in clear text
|
* @param password The password for login in clear text (optional)
|
||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -162,8 +166,8 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Logs user into the system
|
* Logs user into the system
|
||||||
* Async method
|
* Async method
|
||||||
* @param username The user name for login
|
* @param username The user name for login (optional)
|
||||||
* @param password The password for login in clear text
|
* @param password The password for login in clear text (optional)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -200,8 +204,8 @@ public interface UserApi {
|
|||||||
* Updated user
|
* Updated user
|
||||||
* Sync method
|
* Sync method
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param username name that need to be deleted
|
* @param username name that need to be deleted (required)
|
||||||
* @param body Updated user object
|
* @param body Updated user object (optional)
|
||||||
* @return Void
|
* @return Void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -213,8 +217,8 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Updated user
|
* Updated user
|
||||||
* Async method
|
* Async method
|
||||||
* @param username name that need to be deleted
|
* @param username name that need to be deleted (required)
|
||||||
* @param body Updated user object
|
* @param body Updated user object (optional)
|
||||||
* @param cb callback method
|
* @param cb callback method
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
@ -225,3 +229,4 @@ public interface UserApi {
|
|||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,12 +4,14 @@ import java.util.Objects;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class Category {
|
public class Category {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
@ -83,3 +85,5 @@ public class Category {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,16 +7,21 @@ import io.swagger.client.model.Tag;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class InlineResponse200 {
|
public class InlineResponse200 {
|
||||||
|
|
||||||
@SerializedName("tags")
|
@SerializedName("photoUrls")
|
||||||
private List<Tag> tags = new ArrayList<Tag>();
|
private List<String> photoUrls = new ArrayList<String>();
|
||||||
|
|
||||||
|
@SerializedName("name")
|
||||||
|
private String name = null;
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@ -24,6 +29,9 @@ public class InlineResponse200 {
|
|||||||
@SerializedName("category")
|
@SerializedName("category")
|
||||||
private Object category = null;
|
private Object category = null;
|
||||||
|
|
||||||
|
@SerializedName("tags")
|
||||||
|
private List<Tag> tags = new ArrayList<Tag>();
|
||||||
|
|
||||||
|
|
||||||
public enum StatusEnum {
|
public enum StatusEnum {
|
||||||
@SerializedName("available")
|
@SerializedName("available")
|
||||||
@ -50,22 +58,27 @@ public enum StatusEnum {
|
|||||||
@SerializedName("status")
|
@SerializedName("status")
|
||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
|
|
||||||
@SerializedName("name")
|
|
||||||
private String name = null;
|
|
||||||
|
|
||||||
@SerializedName("photoUrls")
|
|
||||||
private List<String> photoUrls = new ArrayList<String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
public List<Tag> getTags() {
|
public List<String> getPhotoUrls() {
|
||||||
return tags;
|
return photoUrls;
|
||||||
}
|
}
|
||||||
public void setTags(List<Tag> tags) {
|
public void setPhotoUrls(List<String> photoUrls) {
|
||||||
this.tags = tags;
|
this.photoUrls = photoUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -91,6 +104,17 @@ public enum StatusEnum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public List<Tag> getTags() {
|
||||||
|
return tags;
|
||||||
|
}
|
||||||
|
public void setTags(List<Tag> tags) {
|
||||||
|
this.tags = tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pet status in the store
|
* pet status in the store
|
||||||
**/
|
**/
|
||||||
@ -103,28 +127,6 @@ public enum StatusEnum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
**/
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
**/
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
public List<String> getPhotoUrls() {
|
|
||||||
return photoUrls;
|
|
||||||
}
|
|
||||||
public void setPhotoUrls(List<String> photoUrls) {
|
|
||||||
this.photoUrls = photoUrls;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
@ -135,17 +137,17 @@ public enum StatusEnum {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
|
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
|
||||||
return Objects.equals(tags, inlineResponse200.tags) &&
|
return Objects.equals(photoUrls, inlineResponse200.photoUrls) &&
|
||||||
|
Objects.equals(name, inlineResponse200.name) &&
|
||||||
Objects.equals(id, inlineResponse200.id) &&
|
Objects.equals(id, inlineResponse200.id) &&
|
||||||
Objects.equals(category, inlineResponse200.category) &&
|
Objects.equals(category, inlineResponse200.category) &&
|
||||||
Objects.equals(status, inlineResponse200.status) &&
|
Objects.equals(tags, inlineResponse200.tags) &&
|
||||||
Objects.equals(name, inlineResponse200.name) &&
|
Objects.equals(status, inlineResponse200.status);
|
||||||
Objects.equals(photoUrls, inlineResponse200.photoUrls);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(tags, id, category, status, name, photoUrls);
|
return Objects.hash(photoUrls, name, id, category, tags, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -153,12 +155,12 @@ public enum StatusEnum {
|
|||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("class InlineResponse200 {\n");
|
sb.append("class InlineResponse200 {\n");
|
||||||
|
|
||||||
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
|
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
sb.append(" category: ").append(toIndentedString(category)).append("\n");
|
sb.append(" category: ").append(toIndentedString(category)).append("\n");
|
||||||
|
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
|
||||||
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
||||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
|
||||||
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
|
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
@ -174,3 +176,5 @@ public enum StatusEnum {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,73 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class Model200Response {
|
||||||
|
|
||||||
|
@SerializedName("name")
|
||||||
|
private Integer name = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Integer getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(Integer name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Model200Response _200Response = (Model200Response) o;
|
||||||
|
return Objects.equals(name, _200Response.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Model200Response {\n");
|
||||||
|
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,73 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class ModelReturn {
|
||||||
|
|
||||||
|
@SerializedName("return")
|
||||||
|
private Integer _return = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Integer getReturn() {
|
||||||
|
return _return;
|
||||||
|
}
|
||||||
|
public void setReturn(Integer _return) {
|
||||||
|
this._return = _return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ModelReturn _return = (ModelReturn) o;
|
||||||
|
return Objects.equals(_return, _return._return);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(_return);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class ModelReturn {\n");
|
||||||
|
|
||||||
|
sb.append(" _return: ").append(toIndentedString(_return)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,89 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class Name {
|
||||||
|
|
||||||
|
@SerializedName("name")
|
||||||
|
private Integer name = null;
|
||||||
|
|
||||||
|
@SerializedName("snake_case")
|
||||||
|
private Integer snakeCase = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Integer getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(Integer name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Integer getSnakeCase() {
|
||||||
|
return snakeCase;
|
||||||
|
}
|
||||||
|
public void setSnakeCase(Integer snakeCase) {
|
||||||
|
this.snakeCase = snakeCase;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Name name = (Name) o;
|
||||||
|
return Objects.equals(name, name.name) &&
|
||||||
|
Objects.equals(snakeCase, name.snakeCase);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(name, snakeCase);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Name {\n");
|
||||||
|
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -5,12 +5,14 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class Order {
|
public class Order {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
@ -169,3 +171,5 @@ public enum StatusEnum {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,12 +8,14 @@ import io.swagger.client.model.Tag;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class Pet {
|
public class Pet {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
@ -175,3 +177,5 @@ public enum StatusEnum {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,73 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class SpecialModelName {
|
||||||
|
|
||||||
|
@SerializedName("$special[property.name]")
|
||||||
|
private Long specialPropertyName = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Long getSpecialPropertyName() {
|
||||||
|
return specialPropertyName;
|
||||||
|
}
|
||||||
|
public void setSpecialPropertyName(Long specialPropertyName) {
|
||||||
|
this.specialPropertyName = specialPropertyName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
SpecialModelName specialModelName = (SpecialModelName) o;
|
||||||
|
return Objects.equals(specialPropertyName, specialModelName.specialPropertyName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(specialPropertyName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class SpecialModelName {\n");
|
||||||
|
|
||||||
|
sb.append(" specialPropertyName: ").append(toIndentedString(specialPropertyName)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -4,12 +4,14 @@ import java.util.Objects;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class Tag {
|
public class Tag {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
@ -83,3 +85,5 @@ public class Tag {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,12 +4,14 @@ import java.util.Objects;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class User {
|
public class User {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
@ -180,3 +182,5 @@ public class User {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
12
samples/client/petstore/java/retrofit2/.gitignore
vendored
Normal file
12
samples/client/petstore/java/retrofit2/.gitignore
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
*.class
|
||||||
|
|
||||||
|
# Mobile Tools for Java (J2ME)
|
||||||
|
.mtj.tmp/
|
||||||
|
|
||||||
|
# Package Files #
|
||||||
|
*.jar
|
||||||
|
*.war
|
||||||
|
*.ear
|
||||||
|
|
||||||
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
|
hs_err_pid*
|
52
samples/client/petstore/java/retrofit2/git_push.sh
Normal file
52
samples/client/petstore/java/retrofit2/git_push.sh
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||||
|
#
|
||||||
|
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
||||||
|
|
||||||
|
git_user_id=$1
|
||||||
|
git_repo_id=$2
|
||||||
|
release_note=$3
|
||||||
|
|
||||||
|
if [ "$git_user_id" = "" ]; then
|
||||||
|
git_user_id="YOUR_GIT_USR_ID"
|
||||||
|
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$git_repo_id" = "" ]; then
|
||||||
|
git_repo_id="YOUR_GIT_REPO_ID"
|
||||||
|
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$release_note" = "" ]; then
|
||||||
|
release_note="Minor update"
|
||||||
|
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Initialize the local directory as a Git repository
|
||||||
|
git init
|
||||||
|
|
||||||
|
# Adds the files in the local repository and stages them for commit.
|
||||||
|
git add .
|
||||||
|
|
||||||
|
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||||
|
git commit -m "$release_note"
|
||||||
|
|
||||||
|
# Sets the new remote
|
||||||
|
git_remote=`git remote`
|
||||||
|
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||||
|
|
||||||
|
if [ "$GIT_TOKEN" = "" ]; then
|
||||||
|
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||||
|
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||||
|
else
|
||||||
|
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
git pull origin master
|
||||||
|
|
||||||
|
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||||
|
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
||||||
|
git push origin master 2>&1 | grep -v 'To https'
|
||||||
|
|
@ -12,17 +12,21 @@ import io.swagger.client.model.Pet;
|
|||||||
import io.swagger.client.model.InlineResponse200;
|
import io.swagger.client.model.InlineResponse200;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface PetApi {
|
public interface PetApi {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new pet to the store
|
* Add a new pet to the store
|
||||||
*
|
*
|
||||||
* @param body Pet object that needs to be added to the store
|
* @param body Pet object that needs to be added to the store (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -35,7 +39,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||||
*
|
*
|
||||||
* @param body Pet object in the form of byte array
|
* @param body Pet object in the form of byte array (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -48,8 +52,8 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Deletes a pet
|
* Deletes a pet
|
||||||
*
|
*
|
||||||
* @param petId Pet id to delete
|
* @param petId Pet id to delete (required)
|
||||||
* @param apiKey
|
* @param apiKey (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -62,7 +66,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Finds Pets by status
|
* Finds Pets by status
|
||||||
* Multiple status values can be provided with comma separated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
* @param status Status values that need to be considered for query
|
* @param status Status values that need to be considered for query (optional, default to available)
|
||||||
* @return Call<List<Pet>>
|
* @return Call<List<Pet>>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -75,7 +79,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Finds Pets by tags
|
* Finds Pets by tags
|
||||||
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||||
* @param tags Tags to filter by
|
* @param tags Tags to filter by (optional)
|
||||||
* @return Call<List<Pet>>
|
* @return Call<List<Pet>>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -88,7 +92,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Find pet by ID
|
* Find pet by ID
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched (required)
|
||||||
* @return Call<Pet>
|
* @return Call<Pet>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -101,7 +105,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched (required)
|
||||||
* @return Call<InlineResponse200>
|
* @return Call<InlineResponse200>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -114,7 +118,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Fake endpoint to test byte array return by 'Find pet by ID'
|
* Fake endpoint to test byte array return by 'Find pet by ID'
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched (required)
|
||||||
* @return Call<byte[]>
|
* @return Call<byte[]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -127,7 +131,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Update an existing pet
|
* Update an existing pet
|
||||||
*
|
*
|
||||||
* @param body Pet object that needs to be added to the store
|
* @param body Pet object that needs to be added to the store (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -140,9 +144,9 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Updates a pet in the store with form data
|
* Updates a pet in the store with form data
|
||||||
*
|
*
|
||||||
* @param petId ID of pet that needs to be updated
|
* @param petId ID of pet that needs to be updated (required)
|
||||||
* @param name Updated name of the pet
|
* @param name Updated name of the pet (optional)
|
||||||
* @param status Updated status of the pet
|
* @param status Updated status of the pet (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -156,9 +160,9 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* uploads an image
|
* uploads an image
|
||||||
*
|
*
|
||||||
* @param petId ID of pet to update
|
* @param petId ID of pet to update (required)
|
||||||
* @param additionalMetadata Additional data to pass to server
|
* @param additionalMetadata Additional data to pass to server (optional)
|
||||||
* @param file file to upload
|
* @param file file to upload (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -170,3 +174,4 @@ public interface PetApi {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,17 +10,21 @@ import okhttp3.RequestBody;
|
|||||||
|
|
||||||
import io.swagger.client.model.Order;
|
import io.swagger.client.model.Order;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface StoreApi {
|
public interface StoreApi {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete purchase order by ID
|
* Delete purchase order by ID
|
||||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
* @param orderId ID of the order that needs to be deleted
|
* @param orderId ID of the order that needs to be deleted (required)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -33,7 +37,7 @@ public interface StoreApi {
|
|||||||
/**
|
/**
|
||||||
* Finds orders by status
|
* Finds orders by status
|
||||||
* A single status value can be provided as a string
|
* A single status value can be provided as a string
|
||||||
* @param status Status value that needs to be considered for query
|
* @param status Status value that needs to be considered for query (optional, default to placed)
|
||||||
* @return Call<List<Order>>
|
* @return Call<List<Order>>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -68,7 +72,7 @@ public interface StoreApi {
|
|||||||
/**
|
/**
|
||||||
* Find purchase order by ID
|
* Find purchase order by ID
|
||||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
* @param orderId ID of pet that needs to be fetched
|
* @param orderId ID of pet that needs to be fetched (required)
|
||||||
* @return Call<Order>
|
* @return Call<Order>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -81,7 +85,7 @@ public interface StoreApi {
|
|||||||
/**
|
/**
|
||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
*
|
*
|
||||||
* @param body order placed for purchasing the pet
|
* @param body order placed for purchasing the pet (optional)
|
||||||
* @return Call<Order>
|
* @return Call<Order>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -92,3 +96,4 @@ public interface StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,17 +10,21 @@ import okhttp3.RequestBody;
|
|||||||
|
|
||||||
import io.swagger.client.model.User;
|
import io.swagger.client.model.User;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface UserApi {
|
public interface UserApi {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create user
|
* Create user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param body Created user object
|
* @param body Created user object (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -33,7 +37,7 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param body List of user object
|
* @param body List of user object (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -46,7 +50,7 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param body List of user object
|
* @param body List of user object (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -59,7 +63,7 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Delete user
|
* Delete user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param username The name that needs to be deleted
|
* @param username The name that needs to be deleted (required)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -72,7 +76,7 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||||
* @return Call<User>
|
* @return Call<User>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -85,8 +89,8 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Logs user into the system
|
* Logs user into the system
|
||||||
*
|
*
|
||||||
* @param username The user name for login
|
* @param username The user name for login (optional)
|
||||||
* @param password The password for login in clear text
|
* @param password The password for login in clear text (optional)
|
||||||
* @return Call<String>
|
* @return Call<String>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -110,8 +114,8 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Updated user
|
* Updated user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param username name that need to be deleted
|
* @param username name that need to be deleted (required)
|
||||||
* @param body Updated user object
|
* @param body Updated user object (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -122,3 +126,4 @@ public interface UserApi {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,12 +4,14 @@ import java.util.Objects;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class Category {
|
public class Category {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
@ -83,3 +85,5 @@ public class Category {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,16 +7,21 @@ import io.swagger.client.model.Tag;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class InlineResponse200 {
|
public class InlineResponse200 {
|
||||||
|
|
||||||
@SerializedName("tags")
|
@SerializedName("photoUrls")
|
||||||
private List<Tag> tags = new ArrayList<Tag>();
|
private List<String> photoUrls = new ArrayList<String>();
|
||||||
|
|
||||||
|
@SerializedName("name")
|
||||||
|
private String name = null;
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
private Long id = null;
|
private Long id = null;
|
||||||
@ -24,6 +29,9 @@ public class InlineResponse200 {
|
|||||||
@SerializedName("category")
|
@SerializedName("category")
|
||||||
private Object category = null;
|
private Object category = null;
|
||||||
|
|
||||||
|
@SerializedName("tags")
|
||||||
|
private List<Tag> tags = new ArrayList<Tag>();
|
||||||
|
|
||||||
|
|
||||||
public enum StatusEnum {
|
public enum StatusEnum {
|
||||||
@SerializedName("available")
|
@SerializedName("available")
|
||||||
@ -50,22 +58,27 @@ public enum StatusEnum {
|
|||||||
@SerializedName("status")
|
@SerializedName("status")
|
||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
|
|
||||||
@SerializedName("name")
|
|
||||||
private String name = null;
|
|
||||||
|
|
||||||
@SerializedName("photoUrls")
|
|
||||||
private List<String> photoUrls = new ArrayList<String>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
public List<Tag> getTags() {
|
public List<String> getPhotoUrls() {
|
||||||
return tags;
|
return photoUrls;
|
||||||
}
|
}
|
||||||
public void setTags(List<Tag> tags) {
|
public void setPhotoUrls(List<String> photoUrls) {
|
||||||
this.tags = tags;
|
this.photoUrls = photoUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -91,6 +104,17 @@ public enum StatusEnum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public List<Tag> getTags() {
|
||||||
|
return tags;
|
||||||
|
}
|
||||||
|
public void setTags(List<Tag> tags) {
|
||||||
|
this.tags = tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* pet status in the store
|
* pet status in the store
|
||||||
**/
|
**/
|
||||||
@ -103,28 +127,6 @@ public enum StatusEnum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
**/
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
**/
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
public List<String> getPhotoUrls() {
|
|
||||||
return photoUrls;
|
|
||||||
}
|
|
||||||
public void setPhotoUrls(List<String> photoUrls) {
|
|
||||||
this.photoUrls = photoUrls;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
@ -135,17 +137,17 @@ public enum StatusEnum {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
|
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
|
||||||
return Objects.equals(tags, inlineResponse200.tags) &&
|
return Objects.equals(photoUrls, inlineResponse200.photoUrls) &&
|
||||||
|
Objects.equals(name, inlineResponse200.name) &&
|
||||||
Objects.equals(id, inlineResponse200.id) &&
|
Objects.equals(id, inlineResponse200.id) &&
|
||||||
Objects.equals(category, inlineResponse200.category) &&
|
Objects.equals(category, inlineResponse200.category) &&
|
||||||
Objects.equals(status, inlineResponse200.status) &&
|
Objects.equals(tags, inlineResponse200.tags) &&
|
||||||
Objects.equals(name, inlineResponse200.name) &&
|
Objects.equals(status, inlineResponse200.status);
|
||||||
Objects.equals(photoUrls, inlineResponse200.photoUrls);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(tags, id, category, status, name, photoUrls);
|
return Objects.hash(photoUrls, name, id, category, tags, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -153,12 +155,12 @@ public enum StatusEnum {
|
|||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("class InlineResponse200 {\n");
|
sb.append("class InlineResponse200 {\n");
|
||||||
|
|
||||||
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
|
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||||
sb.append(" category: ").append(toIndentedString(category)).append("\n");
|
sb.append(" category: ").append(toIndentedString(category)).append("\n");
|
||||||
|
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
|
||||||
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
sb.append(" status: ").append(toIndentedString(status)).append("\n");
|
||||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
|
||||||
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
|
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
@ -174,3 +176,5 @@ public enum StatusEnum {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,73 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class Model200Response {
|
||||||
|
|
||||||
|
@SerializedName("name")
|
||||||
|
private Integer name = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Integer getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(Integer name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Model200Response _200Response = (Model200Response) o;
|
||||||
|
return Objects.equals(name, _200Response.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Model200Response {\n");
|
||||||
|
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,73 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class ModelReturn {
|
||||||
|
|
||||||
|
@SerializedName("return")
|
||||||
|
private Integer _return = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Integer getReturn() {
|
||||||
|
return _return;
|
||||||
|
}
|
||||||
|
public void setReturn(Integer _return) {
|
||||||
|
this._return = _return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ModelReturn _return = (ModelReturn) o;
|
||||||
|
return Objects.equals(_return, _return._return);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(_return);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class ModelReturn {\n");
|
||||||
|
|
||||||
|
sb.append(" _return: ").append(toIndentedString(_return)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,89 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class Name {
|
||||||
|
|
||||||
|
@SerializedName("name")
|
||||||
|
private Integer name = null;
|
||||||
|
|
||||||
|
@SerializedName("snake_case")
|
||||||
|
private Integer snakeCase = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Integer getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(Integer name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Integer getSnakeCase() {
|
||||||
|
return snakeCase;
|
||||||
|
}
|
||||||
|
public void setSnakeCase(Integer snakeCase) {
|
||||||
|
this.snakeCase = snakeCase;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Name name = (Name) o;
|
||||||
|
return Objects.equals(name, name.name) &&
|
||||||
|
Objects.equals(snakeCase, name.snakeCase);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(name, snakeCase);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Name {\n");
|
||||||
|
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -5,12 +5,14 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class Order {
|
public class Order {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
@ -169,3 +171,5 @@ public enum StatusEnum {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,12 +8,14 @@ import io.swagger.client.model.Tag;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class Pet {
|
public class Pet {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
@ -175,3 +177,5 @@ public enum StatusEnum {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,12 +4,14 @@ import java.util.Objects;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class SpecialModelName {
|
public class SpecialModelName {
|
||||||
|
|
||||||
@SerializedName("$special[property.name]")
|
@SerializedName("$special[property.name]")
|
||||||
@ -67,3 +69,5 @@ public class SpecialModelName {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,12 +4,14 @@ import java.util.Objects;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class Tag {
|
public class Tag {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
@ -83,3 +85,5 @@ public class Tag {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,12 +4,14 @@ import java.util.Objects;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class User {
|
public class User {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
@ -180,3 +182,5 @@ public class User {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
12
samples/client/petstore/java/retrofit2rx/.gitignore
vendored
Normal file
12
samples/client/petstore/java/retrofit2rx/.gitignore
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
*.class
|
||||||
|
|
||||||
|
# Mobile Tools for Java (J2ME)
|
||||||
|
.mtj.tmp/
|
||||||
|
|
||||||
|
# Package Files #
|
||||||
|
*.jar
|
||||||
|
*.war
|
||||||
|
*.ear
|
||||||
|
|
||||||
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
|
hs_err_pid*
|
52
samples/client/petstore/java/retrofit2rx/git_push.sh
Normal file
52
samples/client/petstore/java/retrofit2rx/git_push.sh
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
||||||
|
#
|
||||||
|
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
|
||||||
|
|
||||||
|
git_user_id=$1
|
||||||
|
git_repo_id=$2
|
||||||
|
release_note=$3
|
||||||
|
|
||||||
|
if [ "$git_user_id" = "" ]; then
|
||||||
|
git_user_id="YOUR_GIT_USR_ID"
|
||||||
|
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$git_repo_id" = "" ]; then
|
||||||
|
git_repo_id="YOUR_GIT_REPO_ID"
|
||||||
|
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$release_note" = "" ]; then
|
||||||
|
release_note="Minor update"
|
||||||
|
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Initialize the local directory as a Git repository
|
||||||
|
git init
|
||||||
|
|
||||||
|
# Adds the files in the local repository and stages them for commit.
|
||||||
|
git add .
|
||||||
|
|
||||||
|
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
||||||
|
git commit -m "$release_note"
|
||||||
|
|
||||||
|
# Sets the new remote
|
||||||
|
git_remote=`git remote`
|
||||||
|
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||||
|
|
||||||
|
if [ "$GIT_TOKEN" = "" ]; then
|
||||||
|
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
||||||
|
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||||
|
else
|
||||||
|
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
git pull origin master
|
||||||
|
|
||||||
|
# Pushes (Forces) the changes in the local repository up to the remote repository
|
||||||
|
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
||||||
|
git push origin master 2>&1 | grep -v 'To https'
|
||||||
|
|
@ -9,33 +9,24 @@ import retrofit2.http.*;
|
|||||||
import okhttp3.RequestBody;
|
import okhttp3.RequestBody;
|
||||||
|
|
||||||
import io.swagger.client.model.Pet;
|
import io.swagger.client.model.Pet;
|
||||||
import java.io.File;
|
|
||||||
import io.swagger.client.model.InlineResponse200;
|
import io.swagger.client.model.InlineResponse200;
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface PetApi {
|
public interface PetApi {
|
||||||
|
|
||||||
/**
|
|
||||||
* Update an existing pet
|
|
||||||
*
|
|
||||||
* @param body Pet object that needs to be added to the store
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
|
|
||||||
@PUT("pet")
|
|
||||||
Observable<Void> updatePet(
|
|
||||||
@Body Pet body
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a new pet to the store
|
* Add a new pet to the store
|
||||||
*
|
*
|
||||||
* @param body Pet object that needs to be added to the store
|
* @param body Pet object that needs to be added to the store (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -45,10 +36,37 @@ public interface PetApi {
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||||
|
*
|
||||||
|
* @param body Pet object in the form of byte array (optional)
|
||||||
|
* @return Call<Void>
|
||||||
|
*/
|
||||||
|
|
||||||
|
@POST("pet?testing_byte_array=true")
|
||||||
|
Observable<Void> addPetUsingByteArray(
|
||||||
|
@Body byte[] body
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deletes a pet
|
||||||
|
*
|
||||||
|
* @param petId Pet id to delete (required)
|
||||||
|
* @param apiKey (optional)
|
||||||
|
* @return Call<Void>
|
||||||
|
*/
|
||||||
|
|
||||||
|
@DELETE("pet/{petId}")
|
||||||
|
Observable<Void> deletePet(
|
||||||
|
@Path("petId") Long petId, @Header("api_key") String apiKey
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds Pets by status
|
* Finds Pets by status
|
||||||
* Multiple status values can be provided with comma separated strings
|
* Multiple status values can be provided with comma separated strings
|
||||||
* @param status Status values that need to be considered for query
|
* @param status Status values that need to be considered for query (optional, default to available)
|
||||||
* @return Call<List<Pet>>
|
* @return Call<List<Pet>>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -61,7 +79,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Finds Pets by tags
|
* Finds Pets by tags
|
||||||
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||||
* @param tags Tags to filter by
|
* @param tags Tags to filter by (optional)
|
||||||
* @return Call<List<Pet>>
|
* @return Call<List<Pet>>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -74,7 +92,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Find pet by ID
|
* Find pet by ID
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched (required)
|
||||||
* @return Call<Pet>
|
* @return Call<Pet>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -84,56 +102,10 @@ public interface PetApi {
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Updates a pet in the store with form data
|
|
||||||
*
|
|
||||||
* @param petId ID of pet that needs to be updated
|
|
||||||
* @param name Updated name of the pet
|
|
||||||
* @param status Updated status of the pet
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
|
|
||||||
@FormUrlEncoded
|
|
||||||
@POST("pet/{petId}")
|
|
||||||
Observable<Void> updatePetWithForm(
|
|
||||||
@Path("petId") String petId, @Field("name") String name, @Field("status") String status
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Deletes a pet
|
|
||||||
*
|
|
||||||
* @param petId Pet id to delete
|
|
||||||
* @param apiKey
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
|
|
||||||
@DELETE("pet/{petId}")
|
|
||||||
Observable<Void> deletePet(
|
|
||||||
@Path("petId") Long petId, @Header("api_key") String apiKey
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* uploads an image
|
|
||||||
*
|
|
||||||
* @param petId ID of pet to update
|
|
||||||
* @param additionalMetadata Additional data to pass to server
|
|
||||||
* @param file file to upload
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
|
|
||||||
@Multipart
|
|
||||||
@POST("pet/{petId}/uploadImage")
|
|
||||||
Observable<Void> uploadFile(
|
|
||||||
@Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file\"; filename=\"file\"") RequestBody file
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched (required)
|
||||||
* @return Call<InlineResponse200>
|
* @return Call<InlineResponse200>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -146,7 +118,7 @@ public interface PetApi {
|
|||||||
/**
|
/**
|
||||||
* Fake endpoint to test byte array return by 'Find pet by ID'
|
* Fake endpoint to test byte array return by 'Find pet by ID'
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet that needs to be fetched (required)
|
||||||
* @return Call<byte[]>
|
* @return Call<byte[]>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -157,16 +129,49 @@ public interface PetApi {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
* Update an existing pet
|
||||||
*
|
*
|
||||||
* @param body Pet object in the form of byte array
|
* @param body Pet object that needs to be added to the store (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@POST("pet?testing_byte_array=true")
|
@PUT("pet")
|
||||||
Observable<Void> addPetUsingByteArray(
|
Observable<Void> updatePet(
|
||||||
@Body byte[] body
|
@Body Pet body
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Updates a pet in the store with form data
|
||||||
|
*
|
||||||
|
* @param petId ID of pet that needs to be updated (required)
|
||||||
|
* @param name Updated name of the pet (optional)
|
||||||
|
* @param status Updated status of the pet (optional)
|
||||||
|
* @return Call<Void>
|
||||||
|
*/
|
||||||
|
|
||||||
|
@FormUrlEncoded
|
||||||
|
@POST("pet/{petId}")
|
||||||
|
Observable<Void> updatePetWithForm(
|
||||||
|
@Path("petId") String petId, @Field("name") String name, @Field("status") String status
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uploads an image
|
||||||
|
*
|
||||||
|
* @param petId ID of pet to update (required)
|
||||||
|
* @param additionalMetadata Additional data to pass to server (optional)
|
||||||
|
* @param file file to upload (optional)
|
||||||
|
* @return Call<Void>
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Multipart
|
||||||
|
@POST("pet/{petId}/uploadImage")
|
||||||
|
Observable<Void> uploadFile(
|
||||||
|
@Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file\"; filename=\"file\"") RequestBody file
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,17 +10,34 @@ import okhttp3.RequestBody;
|
|||||||
|
|
||||||
import io.swagger.client.model.Order;
|
import io.swagger.client.model.Order;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface StoreApi {
|
public interface StoreApi {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete purchase order by ID
|
||||||
|
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||||
|
* @param orderId ID of the order that needs to be deleted (required)
|
||||||
|
* @return Call<Void>
|
||||||
|
*/
|
||||||
|
|
||||||
|
@DELETE("store/order/{orderId}")
|
||||||
|
Observable<Void> deleteOrder(
|
||||||
|
@Path("orderId") String orderId
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds orders by status
|
* Finds orders by status
|
||||||
* A single status value can be provided as a string
|
* A single status value can be provided as a string
|
||||||
* @param status Status value that needs to be considered for query
|
* @param status Status value that needs to be considered for query (optional, default to placed)
|
||||||
* @return Call<List<Order>>
|
* @return Call<List<Order>>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -52,23 +69,10 @@ public interface StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Place an order for a pet
|
|
||||||
*
|
|
||||||
* @param body order placed for purchasing the pet
|
|
||||||
* @return Call<Order>
|
|
||||||
*/
|
|
||||||
|
|
||||||
@POST("store/order")
|
|
||||||
Observable<Order> placeOrder(
|
|
||||||
@Body Order body
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find purchase order by ID
|
* Find purchase order by ID
|
||||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
* @param orderId ID of pet that needs to be fetched
|
* @param orderId ID of pet that needs to be fetched (required)
|
||||||
* @return Call<Order>
|
* @return Call<Order>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -79,16 +83,17 @@ public interface StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete purchase order by ID
|
* Place an order for a pet
|
||||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
*
|
||||||
* @param orderId ID of the order that needs to be deleted
|
* @param body order placed for purchasing the pet (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Order>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@DELETE("store/order/{orderId}")
|
@POST("store/order")
|
||||||
Observable<Void> deleteOrder(
|
Observable<Order> placeOrder(
|
||||||
@Path("orderId") String orderId
|
@Body Order body
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,17 +10,21 @@ import okhttp3.RequestBody;
|
|||||||
|
|
||||||
import io.swagger.client.model.User;
|
import io.swagger.client.model.User;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public interface UserApi {
|
public interface UserApi {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create user
|
* Create user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param body Created user object
|
* @param body Created user object (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -33,7 +37,7 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param body List of user object
|
* @param body List of user object (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -46,7 +50,7 @@ public interface UserApi {
|
|||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param body List of user object
|
* @param body List of user object (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -56,11 +60,37 @@ public interface UserApi {
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete user
|
||||||
|
* This can only be done by the logged in user.
|
||||||
|
* @param username The name that needs to be deleted (required)
|
||||||
|
* @return Call<Void>
|
||||||
|
*/
|
||||||
|
|
||||||
|
@DELETE("user/{username}")
|
||||||
|
Observable<Void> deleteUser(
|
||||||
|
@Path("username") String username
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get user by user name
|
||||||
|
*
|
||||||
|
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||||
|
* @return Call<User>
|
||||||
|
*/
|
||||||
|
|
||||||
|
@GET("user/{username}")
|
||||||
|
Observable<User> getUserByName(
|
||||||
|
@Path("username") String username
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs user into the system
|
* Logs user into the system
|
||||||
*
|
*
|
||||||
* @param username The user name for login
|
* @param username The user name for login (optional)
|
||||||
* @param password The password for login in clear text
|
* @param password The password for login in clear text (optional)
|
||||||
* @return Call<String>
|
* @return Call<String>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -81,24 +111,11 @@ public interface UserApi {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get user by user name
|
|
||||||
*
|
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
|
||||||
* @return Call<User>
|
|
||||||
*/
|
|
||||||
|
|
||||||
@GET("user/{username}")
|
|
||||||
Observable<User> getUserByName(
|
|
||||||
@Path("username") String username
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updated user
|
* Updated user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param username name that need to be deleted
|
* @param username name that need to be deleted (required)
|
||||||
* @param body Updated user object
|
* @param body Updated user object (optional)
|
||||||
* @return Call<Void>
|
* @return Call<Void>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -108,17 +125,5 @@ public interface UserApi {
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Delete user
|
|
||||||
* This can only be done by the logged in user.
|
|
||||||
* @param username The name that needs to be deleted
|
|
||||||
* @return Call<Void>
|
|
||||||
*/
|
|
||||||
|
|
||||||
@DELETE("user/{username}")
|
|
||||||
Observable<Void> deleteUser(
|
|
||||||
@Path("username") String username
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,12 +4,14 @@ import java.util.Objects;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class Category {
|
public class Category {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
@ -83,3 +85,5 @@ public class Category {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,12 +7,14 @@ import io.swagger.client.model.Tag;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class InlineResponse200 {
|
public class InlineResponse200 {
|
||||||
|
|
||||||
@SerializedName("photoUrls")
|
@SerializedName("photoUrls")
|
||||||
@ -174,3 +176,5 @@ public enum StatusEnum {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,73 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class Model200Response {
|
||||||
|
|
||||||
|
@SerializedName("name")
|
||||||
|
private Integer name = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Integer getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(Integer name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Model200Response _200Response = (Model200Response) o;
|
||||||
|
return Objects.equals(name, _200Response.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Model200Response {\n");
|
||||||
|
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,73 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class ModelReturn {
|
||||||
|
|
||||||
|
@SerializedName("return")
|
||||||
|
private Integer _return = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Integer getReturn() {
|
||||||
|
return _return;
|
||||||
|
}
|
||||||
|
public void setReturn(Integer _return) {
|
||||||
|
this._return = _return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ModelReturn _return = (ModelReturn) o;
|
||||||
|
return Objects.equals(_return, _return._return);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(_return);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class ModelReturn {\n");
|
||||||
|
|
||||||
|
sb.append(" _return: ").append(toIndentedString(_return)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,89 @@
|
|||||||
|
package io.swagger.client.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class Name {
|
||||||
|
|
||||||
|
@SerializedName("name")
|
||||||
|
private Integer name = null;
|
||||||
|
|
||||||
|
@SerializedName("snake_case")
|
||||||
|
private Integer snakeCase = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Integer getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
public void setName(Integer name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public Integer getSnakeCase() {
|
||||||
|
return snakeCase;
|
||||||
|
}
|
||||||
|
public void setSnakeCase(Integer snakeCase) {
|
||||||
|
this.snakeCase = snakeCase;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Name name = (Name) o;
|
||||||
|
return Objects.equals(name, name.name) &&
|
||||||
|
Objects.equals(snakeCase, name.snakeCase);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(name, snakeCase);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class Name {\n");
|
||||||
|
|
||||||
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
|
||||||
|
sb.append("}");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convert the given object to string with each line indented by 4 spaces
|
||||||
|
* (except the first line).
|
||||||
|
*/
|
||||||
|
private String toIndentedString(Object o) {
|
||||||
|
if (o == null) {
|
||||||
|
return "null";
|
||||||
|
}
|
||||||
|
return o.toString().replace("\n", "\n ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -5,12 +5,14 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class Order {
|
public class Order {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
@ -169,3 +171,5 @@ public enum StatusEnum {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,12 +8,14 @@ import io.swagger.client.model.Tag;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class Pet {
|
public class Pet {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
@ -175,3 +177,5 @@ public enum StatusEnum {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,12 +4,14 @@ import java.util.Objects;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class SpecialModelName {
|
public class SpecialModelName {
|
||||||
|
|
||||||
@SerializedName("$special[property.name]")
|
@SerializedName("$special[property.name]")
|
||||||
@ -67,3 +69,5 @@ public class SpecialModelName {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,12 +4,14 @@ import java.util.Objects;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class Tag {
|
public class Tag {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
@ -83,3 +85,5 @@ public class Tag {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,12 +4,14 @@ import java.util.Objects;
|
|||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
|
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
|
||||||
|
|
||||||
public class User {
|
public class User {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
@ -180,3 +182,5 @@ public class User {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/
|
|||||||
|
|
||||||
- API verion: 1.0.0
|
- API verion: 1.0.0
|
||||||
- Package version: 1.0.0
|
- Package version: 1.0.0
|
||||||
- Build date: 2016-03-19T16:59:31.367+08:00
|
- Build date: 2016-03-19T17:46:21.048+08:00
|
||||||
- Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
- Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||||
|
|
||||||
## A note on Moose
|
## A note on Moose
|
||||||
@ -272,7 +272,7 @@ use WWW::SwaggerClient::Object::User;
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||||
my $body = WWW::SwaggerClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
|
my $body = WWW::SwaggerClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
|
||||||
|
@ -34,7 +34,7 @@ Add a new pet to the store
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||||
my $body = WWW::SwaggerClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
|
my $body = WWW::SwaggerClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
|
||||||
@ -80,7 +80,7 @@ Fake endpoint to test byte array in body parameter for adding a new pet to the s
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||||
my $body = WWW::SwaggerClient::Object::string->new(); # string | Pet object in the form of byte array
|
my $body = WWW::SwaggerClient::Object::string->new(); # string | Pet object in the form of byte array
|
||||||
@ -126,7 +126,7 @@ Deletes a pet
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||||
my $pet_id = 789; # int | Pet id to delete
|
my $pet_id = 789; # int | Pet id to delete
|
||||||
@ -174,7 +174,7 @@ Multiple status values can be provided with comma separated strings
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||||
my $status = (); # ARRAY[string] | Status values that need to be considered for query
|
my $status = (); # ARRAY[string] | Status values that need to be considered for query
|
||||||
@ -221,7 +221,7 @@ Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||||
my $tags = (); # ARRAY[string] | Tags to filter by
|
my $tags = (); # ARRAY[string] | Tags to filter by
|
||||||
@ -268,11 +268,11 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure API key authorization: api_key
|
# Configure API key authorization: api_key
|
||||||
WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
||||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||||
my $pet_id = 789; # int | ID of pet that needs to be fetched
|
my $pet_id = 789; # int | ID of pet that needs to be fetched
|
||||||
@ -319,11 +319,11 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure API key authorization: api_key
|
# Configure API key authorization: api_key
|
||||||
WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
||||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||||
my $pet_id = 789; # int | ID of pet that needs to be fetched
|
my $pet_id = 789; # int | ID of pet that needs to be fetched
|
||||||
@ -370,11 +370,11 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error cond
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure API key authorization: api_key
|
# Configure API key authorization: api_key
|
||||||
WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
||||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||||
my $pet_id = 789; # int | ID of pet that needs to be fetched
|
my $pet_id = 789; # int | ID of pet that needs to be fetched
|
||||||
@ -421,7 +421,7 @@ Update an existing pet
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||||
my $body = WWW::SwaggerClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
|
my $body = WWW::SwaggerClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
|
||||||
@ -467,7 +467,7 @@ Updates a pet in the store with form data
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||||
my $pet_id = 'pet_id_example'; # string | ID of pet that needs to be updated
|
my $pet_id = 'pet_id_example'; # string | ID of pet that needs to be updated
|
||||||
@ -517,7 +517,7 @@ uploads an image
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure OAuth2 access token for authorization: petstore_auth
|
# Configure OAuth2 access token for authorization: petstore_auth
|
||||||
WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
my $api_instance = WWW::SwaggerClient::PetApi->new();
|
||||||
my $pet_id = 789; # int | ID of pet to update
|
my $pet_id = 789; # int | ID of pet to update
|
||||||
|
@ -72,13 +72,13 @@ A single status value can be provided as a string
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure API key authorization: test_api_client_id
|
# Configure API key authorization: test_api_client_id
|
||||||
WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_id'} = 'YOUR_API_KEY';
|
$WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_id'} = 'YOUR_API_KEY';
|
||||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_id'} = "BEARER";
|
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_id'} = "BEARER";
|
||||||
# Configure API key authorization: test_api_client_secret
|
# Configure API key authorization: test_api_client_secret
|
||||||
WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_secret'} = 'YOUR_API_KEY';
|
$WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_secret'} = 'YOUR_API_KEY';
|
||||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_secret'} = "BEARER";
|
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_secret'} = "BEARER";
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
||||||
my $status = 'status_example'; # string | Status value that needs to be considered for query
|
my $status = 'status_example'; # string | Status value that needs to be considered for query
|
||||||
@ -125,9 +125,9 @@ Returns a map of status codes to quantities
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure API key authorization: api_key
|
# Configure API key authorization: api_key
|
||||||
WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
||||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
||||||
|
|
||||||
@ -170,9 +170,9 @@ Returns an arbitrary object which is actually a map of status codes to quantitie
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure API key authorization: api_key
|
# Configure API key authorization: api_key
|
||||||
WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
$WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
||||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
||||||
|
|
||||||
@ -215,13 +215,13 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure API key authorization: test_api_key_header
|
# Configure API key authorization: test_api_key_header
|
||||||
WWW::SwaggerClient::Configuration::api_key->{'test_api_key_header'} = 'YOUR_API_KEY';
|
$WWW::SwaggerClient::Configuration::api_key->{'test_api_key_header'} = 'YOUR_API_KEY';
|
||||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'test_api_key_header'} = "BEARER";
|
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'test_api_key_header'} = "BEARER";
|
||||||
# Configure API key authorization: test_api_key_query
|
# Configure API key authorization: test_api_key_query
|
||||||
WWW::SwaggerClient::Configuration::api_key->{'test_api_key_query'} = 'YOUR_API_KEY';
|
$WWW::SwaggerClient::Configuration::api_key->{'test_api_key_query'} = 'YOUR_API_KEY';
|
||||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'test_api_key_query'} = "BEARER";
|
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'test_api_key_query'} = "BEARER";
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
||||||
my $order_id = 'order_id_example'; # string | ID of pet that needs to be fetched
|
my $order_id = 'order_id_example'; # string | ID of pet that needs to be fetched
|
||||||
@ -268,13 +268,13 @@ Place an order for a pet
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure API key authorization: test_api_client_id
|
# Configure API key authorization: test_api_client_id
|
||||||
WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_id'} = 'YOUR_API_KEY';
|
$WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_id'} = 'YOUR_API_KEY';
|
||||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_id'} = "BEARER";
|
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_id'} = "BEARER";
|
||||||
# Configure API key authorization: test_api_client_secret
|
# Configure API key authorization: test_api_client_secret
|
||||||
WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_secret'} = 'YOUR_API_KEY';
|
$WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_secret'} = 'YOUR_API_KEY';
|
||||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_secret'} = "BEARER";
|
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_secret'} = "BEARER";
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
||||||
my $body = WWW::SwaggerClient::Object::Order->new(); # Order | order placed for purchasing the pet
|
my $body = WWW::SwaggerClient::Object::Order->new(); # Order | order placed for purchasing the pet
|
||||||
|
@ -160,8 +160,8 @@ This can only be done by the logged in user.
|
|||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
# Configure HTTP basic authorization: test_http_basic
|
# Configure HTTP basic authorization: test_http_basic
|
||||||
WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
|
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
|
||||||
WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';
|
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';
|
||||||
|
|
||||||
my $api_instance = WWW::SwaggerClient::UserApi->new();
|
my $api_instance = WWW::SwaggerClient::UserApi->new();
|
||||||
my $username = 'username_example'; # string | The name that needs to be deleted
|
my $username = 'username_example'; # string | The name that needs to be deleted
|
||||||
|
@ -37,7 +37,7 @@ has version_info => ( is => 'ro',
|
|||||||
default => sub { {
|
default => sub { {
|
||||||
app_name => 'Swagger Petstore',
|
app_name => 'Swagger Petstore',
|
||||||
app_version => '1.0.0',
|
app_version => '1.0.0',
|
||||||
generated_date => '2016-03-19T16:59:31.367+08:00',
|
generated_date => '2016-03-19T17:46:21.048+08:00',
|
||||||
generator_class => 'class io.swagger.codegen.languages.PerlClientCodegen',
|
generator_class => 'class io.swagger.codegen.languages.PerlClientCodegen',
|
||||||
} },
|
} },
|
||||||
documentation => 'Information about the application version and the codegen codebase version'
|
documentation => 'Information about the application version and the codegen codebase version'
|
||||||
@ -103,7 +103,7 @@ Automatically generated by the Perl Swagger Codegen project:
|
|||||||
|
|
||||||
=over 4
|
=over 4
|
||||||
|
|
||||||
=item Build date: 2016-03-19T16:59:31.367+08:00
|
=item Build date: 2016-03-19T17:46:21.048+08:00
|
||||||
|
|
||||||
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user