mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 02:55:19 +00:00
Merge remote-tracking branch 'origin/master' into 2.3.0
This commit is contained in:
commit
7b57dd0c04
2
bin/windows/android-petstore-all.bat
Executable file
2
bin/windows/android-petstore-all.bat
Executable file
@ -0,0 +1,2 @@
|
||||
call .\bin\windows\android-petstore-volley.bat
|
||||
call .\bin\windows\android-petstore-httpclient.bat
|
10
bin/windows/android-petstore-httpclient.bat
Executable file
10
bin/windows/android-petstore-httpclient.bat
Executable file
@ -0,0 +1,10 @@
|
||||
set executable=.\modules\swagger-codegen-cli\target\swagger-codegen-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l android -o samples\client\petstore\android\httpclient-Dlibrary=httpclient
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
10
bin/windows/android-petstore-volley.bat
Executable file
10
bin/windows/android-petstore-volley.bat
Executable file
@ -0,0 +1,10 @@
|
||||
set executable=.\modules\swagger-codegen-cli\target\swagger-codegen-cli.jar
|
||||
|
||||
If Not Exist %executable% (
|
||||
mvn clean package
|
||||
)
|
||||
|
||||
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties
|
||||
set ags=generate -i modules\swagger-codegen\src\test\resources\2_0\petstore.json -l android -o samples\client\petstore\android\volley
|
||||
|
||||
java %JAVA_OPTS% -jar %executable% %ags%
|
@ -219,8 +219,8 @@ public class SpringCodegen extends AbstractJavaCodegen implements BeanValidation
|
||||
if (!additionalProperties.containsKey(SINGLE_CONTENT_TYPES)) {
|
||||
additionalProperties.put(SINGLE_CONTENT_TYPES, "true");
|
||||
this.setSingleContentTypes(true);
|
||||
|
||||
}
|
||||
additionalProperties.put("useSpringCloudClient", true);
|
||||
|
||||
} else {
|
||||
apiTemplateFiles.put("apiController.mustache", "Controller.java");
|
||||
|
@ -16,7 +16,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
{{#useSpringCloudClient}}
|
||||
import java.io.IOException;
|
||||
{{/useSpringCloudClient}}
|
||||
|
||||
import java.util.List;
|
||||
{{#async}}
|
||||
@ -52,11 +54,20 @@ public interface {{classname}} {
|
||||
produces = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }, {{/hasProduces}}{{#hasConsumes}}
|
||||
consumes = { {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} },{{/hasConsumes}}{{/singleContentTypes}}
|
||||
method = RequestMethod.{{httpMethod}})
|
||||
{{#useSpringCloudClient}}
|
||||
{{#jdk8}}default {{/jdk8}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},{{/hasMore}}{{/allParams}}){{^jdk8}};{{/jdk8}}{{#jdk8}} {
|
||||
// do some magic!
|
||||
return {{#async}}CompletableFuture.completedFuture({{/async}}new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK){{#async}}){{/async}};
|
||||
}{{/jdk8}}
|
||||
|
||||
{{/useSpringCloudClient}}
|
||||
{{^useSpringCloudClient}}
|
||||
{{#jdk8}}default {{/jdk8}}{{#responseWrapper}}{{.}}<{{/responseWrapper}}ResponseEntity<{{>returnTypes}}>{{#responseWrapper}}>{{/responseWrapper}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},{{/allParams}} @RequestHeader("Accept") String accept){{#examples}}{{#-first}} throws IOException{{/-first}}{{/examples}}{{^jdk8}};{{/jdk8}}{{#jdk8}} {
|
||||
// do some magic!
|
||||
return {{#async}}CompletableFuture.completedFuture({{/async}}new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK){{#async}}){{/async}};
|
||||
}{{/jdk8}}
|
||||
|
||||
{{/useSpringCloudClient}}
|
||||
{{/operation}}
|
||||
}
|
||||
{{/operations}}
|
||||
|
@ -17,8 +17,10 @@ import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
{{^useSpringCloudClient}}
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import java.io.IOException;
|
||||
{{/useSpringCloudClient}}
|
||||
|
||||
import java.util.List;
|
||||
{{#async}}
|
||||
@ -52,6 +54,25 @@ public class {{classname}}Controller implements {{classname}} {
|
||||
public {{#async}}Callable<{{/async}}ResponseEntity<{{>returnTypes}}>{{#async}}>{{/async}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}},
|
||||
{{/allParams}}@RequestHeader("Accept") String accept){{#examples}}{{#-first}} throws IOException{{/-first}}{{/examples}} {
|
||||
// do some magic!
|
||||
{{#useSpringCloudClient}}
|
||||
{{^isDelegate}}
|
||||
{{^async}}
|
||||
return new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK);
|
||||
{{/async}}
|
||||
{{#async}}
|
||||
return new Callable<ResponseEntity<{{>returnTypes}}>>() {
|
||||
@Override
|
||||
public ResponseEntity<{{>returnTypes}}> call() throws Exception {
|
||||
return new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK);
|
||||
}
|
||||
};
|
||||
{{/async}}
|
||||
{{/isDelegate}}
|
||||
{{#isDelegate}}
|
||||
return delegate.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
{{/isDelegate}}
|
||||
{{/useSpringCloudClient}}
|
||||
{{^useSpringCloudClient}}
|
||||
{{^isDelegate}}
|
||||
{{^async}}
|
||||
{{#examples}}
|
||||
@ -75,6 +96,7 @@ public class {{classname}}Controller implements {{classname}} {
|
||||
{{#isDelegate}}
|
||||
return delegate.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
{{/isDelegate}}
|
||||
{{/useSpringCloudClient}}
|
||||
}
|
||||
|
||||
{{/operation}}
|
||||
|
@ -48,12 +48,14 @@ public class {{classname}} {
|
||||
*/
|
||||
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||
Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||
{{#allParams}}{{#required}}
|
||||
{{#allParams}}
|
||||
{{#required}}
|
||||
// verify the required parameter '{{paramName}}' is set
|
||||
if ({{paramName}} == null) {
|
||||
throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{nickname}}");
|
||||
}
|
||||
{{/required}}{{/allParams}}
|
||||
{{/required}}
|
||||
{{/allParams}}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}}.replaceAll("\\{" + "{{baseName}}" + "\\}", apiInvoker.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
||||
|
@ -127,15 +127,15 @@ public class {{classname}} {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,13 +147,15 @@ public class {{classname}} {
|
||||
public void {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{^hasMore}}, {{/hasMore}}{{/allParams}}final Response.Listener<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}String{{/returnType}}> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||
|
||||
{{#allParams}}{{#required}}
|
||||
{{#allParams}}
|
||||
{{#required}}
|
||||
// verify the required parameter '{{paramName}}' is set
|
||||
if ({{paramName}} == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter '{{paramName}}' when calling {{nickname}}",
|
||||
new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{nickname}}"));
|
||||
VolleyError error = new VolleyError("Missing the required parameter '{{paramName}}' when calling {{nickname}}",
|
||||
new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{nickname}}"));
|
||||
}
|
||||
{{/required}}{{/allParams}}
|
||||
{{/required}}
|
||||
{{/allParams}}
|
||||
|
||||
// create path and map variables
|
||||
String path = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}}.replaceAll("\\{" + "{{baseName}}" + "\\}", apiInvoker.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
||||
@ -199,7 +201,7 @@ public class {{classname}} {
|
||||
{{/formParams}}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} };
|
||||
String[] authNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "{{httpMethod}}", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
|
@ -1,29 +1,20 @@
|
||||
swagger: '2.0'
|
||||
info:
|
||||
description: 'This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.'
|
||||
description: >-
|
||||
This is a sample server Petstore server. You can find out more about
|
||||
Swagger at <a href="http://swagger.io">http://swagger.io</a> or on
|
||||
irc.freenode.net, #swagger. For this sample, you can use the api key
|
||||
"special-key" to test the authorization filters
|
||||
version: 1.0.0
|
||||
title: Swagger Petstore
|
||||
termsOfService: 'http://swagger.io/terms/'
|
||||
termsOfService: 'http://helloreverb.com/terms/'
|
||||
contact:
|
||||
email: apiteam@swagger.io
|
||||
email: apiteam@wordnik.com
|
||||
license:
|
||||
name: Apache 2.0
|
||||
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
|
||||
host: petstore.swagger.io
|
||||
basePath: /v2
|
||||
tags:
|
||||
- name: pet
|
||||
description: Everything about your Pets
|
||||
externalDocs:
|
||||
description: Find out more
|
||||
url: 'http://swagger.io'
|
||||
- name: store
|
||||
description: Access to Petstore orders
|
||||
- name: user
|
||||
description: Operations about user
|
||||
externalDocs:
|
||||
description: Find out more about our store
|
||||
url: 'http://swagger.io'
|
||||
schemes:
|
||||
- http
|
||||
paths:
|
||||
@ -38,13 +29,13 @@ paths:
|
||||
- application/json
|
||||
- application/xml
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- in: body
|
||||
name: body
|
||||
description: Pet object that needs to be added to the store
|
||||
required: true
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/definitions/Pet'
|
||||
responses:
|
||||
@ -64,13 +55,13 @@ paths:
|
||||
- application/json
|
||||
- application/xml
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- in: body
|
||||
name: body
|
||||
description: Pet object that needs to be added to the store
|
||||
required: true
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/definitions/Pet'
|
||||
responses:
|
||||
@ -92,13 +83,13 @@ paths:
|
||||
description: Multiple status values can be provided with comma separated strings
|
||||
operationId: findPetsByStatus
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- name: status
|
||||
in: query
|
||||
description: Status values that need to be considered for filter
|
||||
required: true
|
||||
required: false
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
@ -106,8 +97,8 @@ paths:
|
||||
- available
|
||||
- pending
|
||||
- sold
|
||||
default: available
|
||||
collectionFormat: csv
|
||||
collectionFormat: multi
|
||||
default: available
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
@ -115,6 +106,13 @@ paths:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/definitions/Pet'
|
||||
examples:
|
||||
application/json:
|
||||
name: Puma
|
||||
type: Dog
|
||||
color: Black
|
||||
gender: Female
|
||||
breed: Mixed
|
||||
'400':
|
||||
description: Invalid status value
|
||||
security:
|
||||
@ -126,20 +124,22 @@ paths:
|
||||
tags:
|
||||
- pet
|
||||
summary: Finds Pets by tags
|
||||
description: 'Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.'
|
||||
description: >-
|
||||
Multiple tags can be provided with comma separated strings. Use tag1,
|
||||
tag2, tag3 for testing.
|
||||
operationId: findPetsByTags
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- name: tags
|
||||
in: query
|
||||
description: Tags to filter by
|
||||
required: true
|
||||
required: false
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
collectionFormat: csv
|
||||
collectionFormat: multi
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
@ -158,15 +158,17 @@ paths:
|
||||
tags:
|
||||
- pet
|
||||
summary: Find pet by ID
|
||||
description: Returns a single pet
|
||||
description: >-
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API
|
||||
error conditions
|
||||
operationId: getPetById
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- name: petId
|
||||
in: path
|
||||
description: ID of pet to return
|
||||
description: ID of pet that needs to be fetched
|
||||
required: true
|
||||
type: integer
|
||||
format: int64
|
||||
@ -181,6 +183,9 @@ paths:
|
||||
description: Pet not found
|
||||
security:
|
||||
- api_key: []
|
||||
- petstore_auth:
|
||||
- 'write:pets'
|
||||
- 'read:pets'
|
||||
post:
|
||||
tags:
|
||||
- pet
|
||||
@ -190,15 +195,14 @@ paths:
|
||||
consumes:
|
||||
- application/x-www-form-urlencoded
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- name: petId
|
||||
in: path
|
||||
description: ID of pet that needs to be updated
|
||||
required: true
|
||||
type: integer
|
||||
format: int64
|
||||
type: string
|
||||
- name: name
|
||||
in: formData
|
||||
description: Updated name of the pet
|
||||
@ -223,11 +227,12 @@ paths:
|
||||
description: ''
|
||||
operationId: deletePet
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- name: api_key
|
||||
in: header
|
||||
description: ''
|
||||
required: false
|
||||
type: string
|
||||
- name: petId
|
||||
@ -254,6 +259,7 @@ paths:
|
||||
- multipart/form-data
|
||||
produces:
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- name: petId
|
||||
in: path
|
||||
@ -272,10 +278,8 @@ paths:
|
||||
required: false
|
||||
type: file
|
||||
responses:
|
||||
'200':
|
||||
default:
|
||||
description: successful operation
|
||||
schema:
|
||||
$ref: '#/definitions/ApiResponse'
|
||||
security:
|
||||
- petstore_auth:
|
||||
- 'write:pets'
|
||||
@ -289,7 +293,7 @@ paths:
|
||||
operationId: getInventory
|
||||
produces:
|
||||
- application/json
|
||||
parameters: []
|
||||
- application/xml
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
@ -308,13 +312,13 @@ paths:
|
||||
description: ''
|
||||
operationId: placeOrder
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- in: body
|
||||
name: body
|
||||
description: order placed for purchasing the pet
|
||||
required: true
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/definitions/Order'
|
||||
responses:
|
||||
@ -329,20 +333,19 @@ paths:
|
||||
tags:
|
||||
- store
|
||||
summary: Find purchase order by ID
|
||||
description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions'
|
||||
description: >-
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values
|
||||
will generated exceptions
|
||||
operationId: getOrderById
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- name: orderId
|
||||
in: path
|
||||
description: ID of pet that needs to be fetched
|
||||
required: true
|
||||
type: integer
|
||||
maximum: 5
|
||||
minimum: 1
|
||||
format: int64
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
@ -356,11 +359,13 @@ paths:
|
||||
tags:
|
||||
- store
|
||||
summary: Delete purchase order by ID
|
||||
description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
description: >-
|
||||
For valid response try integer IDs with value < 1000. Anything above
|
||||
1000 or nonintegers will generate API errors
|
||||
operationId: deleteOrder
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- name: orderId
|
||||
in: path
|
||||
@ -380,13 +385,13 @@ paths:
|
||||
description: This can only be done by the logged in user.
|
||||
operationId: createUser
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- in: body
|
||||
name: body
|
||||
description: Created user object
|
||||
required: true
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/definitions/User'
|
||||
responses:
|
||||
@ -400,13 +405,13 @@ paths:
|
||||
description: ''
|
||||
operationId: createUsersWithArrayInput
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- in: body
|
||||
name: body
|
||||
description: List of user object
|
||||
required: true
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
@ -422,13 +427,13 @@ paths:
|
||||
description: ''
|
||||
operationId: createUsersWithListInput
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- in: body
|
||||
name: body
|
||||
description: List of user object
|
||||
required: true
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
@ -444,33 +449,24 @@ paths:
|
||||
description: ''
|
||||
operationId: loginUser
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- name: username
|
||||
in: query
|
||||
description: The user name for login
|
||||
required: true
|
||||
required: false
|
||||
type: string
|
||||
- name: password
|
||||
in: query
|
||||
description: The password for login in clear text
|
||||
required: true
|
||||
required: false
|
||||
type: string
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
schema:
|
||||
type: string
|
||||
headers:
|
||||
X-Rate-Limit:
|
||||
type: integer
|
||||
format: int32
|
||||
description: calls per hour allowed by the user
|
||||
X-Expires-After:
|
||||
type: string
|
||||
format: date-time
|
||||
description: date in UTC when toekn expires
|
||||
'400':
|
||||
description: Invalid username/password supplied
|
||||
/user/logout:
|
||||
@ -481,9 +477,8 @@ paths:
|
||||
description: ''
|
||||
operationId: logoutUser
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
parameters: []
|
||||
- application/xml
|
||||
responses:
|
||||
default:
|
||||
description: successful operation
|
||||
@ -495,8 +490,8 @@ paths:
|
||||
description: ''
|
||||
operationId: getUserByName
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- name: username
|
||||
in: path
|
||||
@ -519,8 +514,8 @@ paths:
|
||||
description: This can only be done by the logged in user.
|
||||
operationId: updateUser
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- name: username
|
||||
in: path
|
||||
@ -530,7 +525,7 @@ paths:
|
||||
- in: body
|
||||
name: body
|
||||
description: Updated user object
|
||||
required: true
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/definitions/User'
|
||||
responses:
|
||||
@ -545,8 +540,8 @@ paths:
|
||||
description: This can only be done by the logged in user.
|
||||
operationId: deleteUser
|
||||
produces:
|
||||
- application/xml
|
||||
- application/json
|
||||
- application/xml
|
||||
parameters:
|
||||
- name: username
|
||||
in: path
|
||||
@ -559,6 +554,10 @@ paths:
|
||||
'404':
|
||||
description: User not found
|
||||
securityDefinitions:
|
||||
api_key:
|
||||
type: apiKey
|
||||
name: api_key
|
||||
in: header
|
||||
petstore_auth:
|
||||
type: oauth2
|
||||
authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
|
||||
@ -566,56 +565,8 @@ securityDefinitions:
|
||||
scopes:
|
||||
'write:pets': modify pets in your account
|
||||
'read:pets': read your pets
|
||||
api_key:
|
||||
type: apiKey
|
||||
name: api_key
|
||||
in: header
|
||||
definitions:
|
||||
Order:
|
||||
title: Pet Order
|
||||
description: An order for a pets from the pet store
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
petId:
|
||||
type: integer
|
||||
format: int64
|
||||
quantity:
|
||||
type: integer
|
||||
format: int32
|
||||
shipDate:
|
||||
type: string
|
||||
format: date-time
|
||||
status:
|
||||
type: string
|
||||
description: Order Status
|
||||
enum:
|
||||
- placed
|
||||
- approved
|
||||
- delivered
|
||||
complete:
|
||||
type: boolean
|
||||
default: false
|
||||
xml:
|
||||
name: Order
|
||||
Category:
|
||||
title: Pet catehgry
|
||||
description: A category for a pet
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
name:
|
||||
type: string
|
||||
xml:
|
||||
name: Category
|
||||
User:
|
||||
title: a User
|
||||
description: A User who is purchasing from the pet store
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
@ -638,10 +589,7 @@ definitions:
|
||||
description: User Status
|
||||
xml:
|
||||
name: User
|
||||
Tag:
|
||||
title: Pet Tag
|
||||
description: A tag for a pet
|
||||
type: object
|
||||
Category:
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
@ -649,11 +597,8 @@ definitions:
|
||||
name:
|
||||
type: string
|
||||
xml:
|
||||
name: Tag
|
||||
name: Category
|
||||
Pet:
|
||||
title: a Pet
|
||||
description: A pet for sale in the pet store
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- photoUrls
|
||||
@ -689,18 +634,37 @@ definitions:
|
||||
- sold
|
||||
xml:
|
||||
name: Pet
|
||||
ApiResponse:
|
||||
title: An uploaded response
|
||||
description: Describes the result of uploading an image resource
|
||||
type: object
|
||||
Tag:
|
||||
properties:
|
||||
code:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
name:
|
||||
type: string
|
||||
xml:
|
||||
name: Tag
|
||||
Order:
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
petId:
|
||||
type: integer
|
||||
format: int64
|
||||
quantity:
|
||||
type: integer
|
||||
format: int32
|
||||
type:
|
||||
shipDate:
|
||||
type: string
|
||||
message:
|
||||
format: date-time
|
||||
status:
|
||||
type: string
|
||||
externalDocs:
|
||||
description: Find out more about Swagger
|
||||
url: 'http://swagger.io'
|
||||
description: Order Status
|
||||
enum:
|
||||
- placed
|
||||
- approved
|
||||
- delivered
|
||||
complete:
|
||||
type: boolean
|
||||
xml:
|
||||
name: Order
|
||||
|
6
pom.xml
6
pom.xml
@ -803,7 +803,6 @@
|
||||
<module>samples/client/petstore/jaxrs-cxf-client</module>
|
||||
<module>samples/client/petstore/java/resttemplate</module>
|
||||
<module>samples/client/petstore/scala</module>
|
||||
<!-- only test java-related projects
|
||||
<module>samples/client/petstore/akka-scala</module>
|
||||
<module>samples/client/petstore/ruby</module>
|
||||
<module>samples/client/petstore/android/volley</module>
|
||||
@ -818,7 +817,6 @@
|
||||
<module>samples/client/petstore/typescript-angular</module>
|
||||
<module>samples/client/petstore/typescript-node/npm</module>
|
||||
<module>samples/client/petstore/typescript-jquery/npm</module>
|
||||
-->
|
||||
<!--module>samples/client/petstore/objc/SwaggerClientTests</module-->
|
||||
<!--module>samples/client/petstore/swift/SwaggerClientTests</module-->
|
||||
<!-- servers -->
|
||||
@ -833,15 +831,13 @@
|
||||
<module>samples/server/petstore/jaxrs-resteasy/joda</module>
|
||||
<module>samples/server/petstore/scalatra</module>
|
||||
<module>samples/server/petstore/spring-mvc</module>
|
||||
<!-- comment out due to change in method signature
|
||||
<module>samples/client/petstore/spring-cloud</module> -->
|
||||
<module>samples/client/petstore/spring-cloud</module>
|
||||
<module>samples/server/petstore/springboot</module>
|
||||
<module>samples/server/petstore/springboot-beanvalidation</module>
|
||||
<module>samples/server/petstore/jaxrs-cxf</module>
|
||||
<module>samples/server/petstore/jaxrs-cxf-annotated-base-path</module>
|
||||
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
|
||||
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
|
||||
|
||||
<!--<module>samples/server/petstore/java-msf4j</module> note: JDK8 only -->
|
||||
</modules>
|
||||
</profile>
|
||||
|
@ -802,8 +802,8 @@
|
||||
<module>samples/client/petstore/java/retrofit2rx</module>
|
||||
<module>samples/client/petstore/jaxrs-cxf-client</module>
|
||||
<module>samples/client/petstore/java/resttemplate</module>
|
||||
<module>samples/client/petstore/scala</module>
|
||||
<!-- only test java-related projects
|
||||
<module>samples/client/petstore/scala</module>
|
||||
<module>samples/client/petstore/akka-scala</module>
|
||||
<module>samples/client/petstore/ruby</module>
|
||||
<module>samples/client/petstore/android/volley</module>
|
||||
@ -831,7 +831,7 @@
|
||||
<module>samples/server/petstore/jaxrs-resteasy/eap</module>
|
||||
<module>samples/server/petstore/jaxrs-resteasy/eap-joda</module>
|
||||
<module>samples/server/petstore/jaxrs-resteasy/joda</module>
|
||||
<module>samples/server/petstore/scalatra</module>
|
||||
<!--<module>samples/server/petstore/scalatra</module>-->
|
||||
<module>samples/server/petstore/spring-mvc</module>
|
||||
<!-- comment out due to change in method signature
|
||||
<module>samples/client/petstore/spring-cloud</module> -->
|
||||
@ -841,7 +841,6 @@
|
||||
<module>samples/server/petstore/jaxrs-cxf-annotated-base-path</module>
|
||||
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
|
||||
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
|
||||
|
||||
<!--<module>samples/server/petstore/java-msf4j</module> note: JDK8 only -->
|
||||
</modules>
|
||||
</profile>
|
||||
|
@ -106,6 +106,7 @@ Class | Method | HTTP request | Description
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
- [ApiResponse](docs/ApiResponse.md)
|
||||
- [Category](docs/Category.md)
|
||||
- [Order](docs/Order.md)
|
||||
- [Pet](docs/Pet.md)
|
||||
@ -138,5 +139,5 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea
|
||||
|
||||
## Author
|
||||
|
||||
apiteam@wordnik.com
|
||||
apiteam@swagger.io
|
||||
|
||||
|
@ -6,8 +6,8 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
||||
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,12 +22,12 @@ apply plugin: 'com.android.library'
|
||||
apply plugin: 'com.github.dcendents.android-maven'
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '23.0.2'
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion '25.0.2'
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion 25
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
|
@ -0,0 +1,12 @@
|
||||
|
||||
# ApiResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **Integer** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**message** | **String** | | [optional]
|
||||
|
||||
|
||||
|
@ -41,7 +41,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -54,7 +54,7 @@ null (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="deletePet"></a>
|
||||
# **deletePet**
|
||||
@ -98,7 +98,7 @@ null (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="findPetsByStatus"></a>
|
||||
# **findPetsByStatus**
|
||||
@ -114,7 +114,7 @@ Multiple status values can be provided with comma separated strings
|
||||
//import io.swagger.client.api.PetApi;
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
List<String> status = Arrays.asList("available"); // List<String> | Status values that need to be considered for filter
|
||||
List<String> status = Arrays.asList("status_example"); // List<String> | Status values that need to be considered for filter
|
||||
try {
|
||||
List<Pet> result = apiInstance.findPetsByStatus(status);
|
||||
System.out.println(result);
|
||||
@ -128,7 +128,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [optional] [default to available] [enum: available, pending, sold]
|
||||
**status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -141,7 +141,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="findPetsByTags"></a>
|
||||
# **findPetsByTags**
|
||||
@ -171,7 +171,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**List<String>**](String.md)| Tags to filter by | [optional]
|
||||
**tags** | [**List<String>**](String.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -184,7 +184,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="getPetById"></a>
|
||||
# **getPetById**
|
||||
@ -192,7 +192,7 @@ Name | Type | Description | Notes
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
Returns a single pet
|
||||
|
||||
### Example
|
||||
```java
|
||||
@ -200,7 +200,7 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API erro
|
||||
//import io.swagger.client.api.PetApi;
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 789L; // Long | ID of pet that needs to be fetched
|
||||
Long petId = 789L; // Long | ID of pet to return
|
||||
try {
|
||||
Pet result = apiInstance.getPetById(petId);
|
||||
System.out.println(result);
|
||||
@ -214,7 +214,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet that needs to be fetched |
|
||||
**petId** | **Long**| ID of pet to return |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -222,12 +222,12 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="updatePet"></a>
|
||||
# **updatePet**
|
||||
@ -256,7 +256,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -269,7 +269,7 @@ null (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="updatePetWithForm"></a>
|
||||
# **updatePetWithForm**
|
||||
@ -285,7 +285,7 @@ Updates a pet in the store with form data
|
||||
//import io.swagger.client.api.PetApi;
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
String petId = "petId_example"; // String | ID of pet that needs to be updated
|
||||
Long petId = 789L; // Long | ID of pet that needs to be updated
|
||||
String name = "name_example"; // String | Updated name of the pet
|
||||
String status = "status_example"; // String | Updated status of the pet
|
||||
try {
|
||||
@ -300,7 +300,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **String**| ID of pet that needs to be updated |
|
||||
**petId** | **Long**| ID of pet that needs to be updated |
|
||||
**name** | **String**| Updated name of the pet | [optional]
|
||||
**status** | **String**| Updated status of the pet | [optional]
|
||||
|
||||
@ -315,11 +315,11 @@ null (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="uploadFile"></a>
|
||||
# **uploadFile**
|
||||
> uploadFile(petId, additionalMetadata, file)
|
||||
> ApiResponse uploadFile(petId, additionalMetadata, file)
|
||||
|
||||
uploads an image
|
||||
|
||||
@ -335,7 +335,8 @@ Long petId = 789L; // Long | ID of pet to update
|
||||
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
||||
File file = new File("/path/to/file.txt"); // File | file to upload
|
||||
try {
|
||||
apiInstance.uploadFile(petId, additionalMetadata, file);
|
||||
ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFile");
|
||||
e.printStackTrace();
|
||||
@ -352,7 +353,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -361,5 +362,5 @@ null (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/json
|
||||
|
||||
|
@ -50,7 +50,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="getInventory"></a>
|
||||
# **getInventory**
|
||||
@ -89,7 +89,7 @@ This endpoint does not need any parameter.
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="getOrderById"></a>
|
||||
# **getOrderById**
|
||||
@ -105,7 +105,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
|
||||
//import io.swagger.client.api.StoreApi;
|
||||
|
||||
StoreApi apiInstance = new StoreApi();
|
||||
String orderId = "orderId_example"; // String | ID of pet that needs to be fetched
|
||||
Long orderId = 789L; // Long | ID of pet that needs to be fetched
|
||||
try {
|
||||
Order result = apiInstance.getOrderById(orderId);
|
||||
System.out.println(result);
|
||||
@ -119,7 +119,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **String**| ID of pet that needs to be fetched |
|
||||
**orderId** | **Long**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -132,7 +132,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="placeOrder"></a>
|
||||
# **placeOrder**
|
||||
@ -162,7 +162,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -175,5 +175,5 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
@ -41,7 +41,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**User**](User.md)| Created user object | [optional]
|
||||
**body** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -54,7 +54,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="createUsersWithArrayInput"></a>
|
||||
# **createUsersWithArrayInput**
|
||||
@ -83,7 +83,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object | [optional]
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -96,7 +96,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="createUsersWithListInput"></a>
|
||||
# **createUsersWithListInput**
|
||||
@ -125,7 +125,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object | [optional]
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -138,7 +138,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="deleteUser"></a>
|
||||
# **deleteUser**
|
||||
@ -180,7 +180,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="getUserByName"></a>
|
||||
# **getUserByName**
|
||||
@ -223,7 +223,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="loginUser"></a>
|
||||
# **loginUser**
|
||||
@ -254,8 +254,8 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The user name for login | [optional]
|
||||
**password** | **String**| The password for login in clear text | [optional]
|
||||
**username** | **String**| The user name for login |
|
||||
**password** | **String**| The password for login in clear text |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -268,7 +268,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="logoutUser"></a>
|
||||
# **logoutUser**
|
||||
@ -306,7 +306,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="updateUser"></a>
|
||||
# **updateUser**
|
||||
@ -337,7 +337,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| name that need to be deleted |
|
||||
**body** | [**User**](User.md)| Updated user object | [optional]
|
||||
**body** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -350,5 +350,5 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
|
@ -35,6 +35,10 @@ public class JsonUtil {
|
||||
public static Type getListTypeForDeserialization(Class cls) {
|
||||
String className = cls.getSimpleName();
|
||||
|
||||
if ("ApiResponse".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<List<ApiResponse>>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Category".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<List<Category>>(){}.getType();
|
||||
}
|
||||
@ -61,6 +65,10 @@ public class JsonUtil {
|
||||
public static Type getTypeForDeserialization(Class cls) {
|
||||
String className = cls.getSimpleName();
|
||||
|
||||
if ("ApiResponse".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<ApiResponse>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Category".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<Category>(){}.getType();
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -20,6 +20,7 @@ import io.swagger.client.model.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import io.swagger.client.model.ApiResponse;
|
||||
import java.io.File;
|
||||
import io.swagger.client.model.Pet;
|
||||
|
||||
@ -57,7 +58,10 @@ public class PetApi {
|
||||
*/
|
||||
public void addPet (Pet body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'body' when calling addPet");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
|
||||
@ -107,12 +111,10 @@ public class PetApi {
|
||||
*/
|
||||
public void deletePet (Long petId, String apiKey) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet");
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
@ -162,7 +164,10 @@ public class PetApi {
|
||||
*/
|
||||
public List<Pet> findPetsByStatus (List<String> status) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'status' is set
|
||||
if (status == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
||||
@ -174,7 +179,7 @@ public class PetApi {
|
||||
// form params
|
||||
Map<String, String> localVarFormParams = new HashMap<String, String>();
|
||||
|
||||
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("multi", "status", status));
|
||||
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("csv", "status", status));
|
||||
|
||||
|
||||
String[] localVarContentTypes = {
|
||||
@ -212,7 +217,10 @@ public class PetApi {
|
||||
*/
|
||||
public List<Pet> findPetsByTags (List<String> tags) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'tags' is set
|
||||
if (tags == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
||||
@ -224,7 +232,7 @@ public class PetApi {
|
||||
// form params
|
||||
Map<String, String> localVarFormParams = new HashMap<String, String>();
|
||||
|
||||
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("multi", "tags", tags));
|
||||
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("csv", "tags", tags));
|
||||
|
||||
|
||||
String[] localVarContentTypes = {
|
||||
@ -256,18 +264,16 @@ public class PetApi {
|
||||
}
|
||||
/**
|
||||
* Find pet by ID
|
||||
* 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
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return
|
||||
* @return Pet
|
||||
*/
|
||||
public Pet getPetById (Long petId) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById");
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
@ -316,7 +322,10 @@ public class PetApi {
|
||||
*/
|
||||
public void updatePet (Pet body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
|
||||
@ -365,14 +374,12 @@ public class PetApi {
|
||||
* @param status Updated status of the pet
|
||||
* @return void
|
||||
*/
|
||||
public void updatePetWithForm (String petId, String name, String status) throws ApiException {
|
||||
public void updatePetWithForm (Long petId, String name, String status) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm");
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
@ -429,16 +436,14 @@ localVarFormParams.put("status", ApiInvoker.parameterToString(status));
|
||||
* @param petId ID of pet to update
|
||||
* @param additionalMetadata Additional data to pass to server
|
||||
* @param file file to upload
|
||||
* @return void
|
||||
* @return ApiResponse
|
||||
*/
|
||||
public void uploadFile (Long petId, String additionalMetadata, File file) throws ApiException {
|
||||
public ApiResponse uploadFile (Long petId, String additionalMetadata, File file) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile");
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
@ -480,10 +485,10 @@ localVarFormParams.put("status", ApiInvoker.parameterToString(status));
|
||||
try {
|
||||
String localVarResponse = apiInvoker.invokeAPI(basePath, localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarContentType);
|
||||
if(localVarResponse != null){
|
||||
return ;
|
||||
return (ApiResponse) ApiInvoker.deserialize(localVarResponse, "", ApiResponse.class);
|
||||
}
|
||||
else {
|
||||
return ;
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
throw ex;
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -57,12 +57,10 @@ public class StoreApi {
|
||||
*/
|
||||
public void deleteOrder (String orderId) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder");
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
||||
@ -110,7 +108,6 @@ public class StoreApi {
|
||||
*/
|
||||
public Map<String, Integer> getInventory () throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/inventory".replaceAll("\\{format\\}","json");
|
||||
@ -157,14 +154,12 @@ public class StoreApi {
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
* @return Order
|
||||
*/
|
||||
public Order getOrderById (String orderId) throws ApiException {
|
||||
public Order getOrderById (Long orderId) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById");
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
||||
@ -213,7 +208,10 @@ public class StoreApi {
|
||||
*/
|
||||
public Order placeOrder (Order body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/order".replaceAll("\\{format\\}","json");
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -57,7 +57,10 @@ public class UserApi {
|
||||
*/
|
||||
public void createUser (User body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'body' when calling createUser");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user".replaceAll("\\{format\\}","json");
|
||||
@ -106,7 +109,10 @@ public class UserApi {
|
||||
*/
|
||||
public void createUsersWithArrayInput (List<User> body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
||||
@ -155,7 +161,10 @@ public class UserApi {
|
||||
*/
|
||||
public void createUsersWithListInput (List<User> body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/createWithList".replaceAll("\\{format\\}","json");
|
||||
@ -204,12 +213,10 @@ public class UserApi {
|
||||
*/
|
||||
public void deleteUser (String username) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser");
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||
@ -258,12 +265,10 @@ public class UserApi {
|
||||
*/
|
||||
public User getUserByName (String username) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName");
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||
@ -313,7 +318,14 @@ public class UserApi {
|
||||
*/
|
||||
public String loginUser (String username, String password) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");
|
||||
}
|
||||
// verify the required parameter 'password' is set
|
||||
if (password == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/login".replaceAll("\\{format\\}","json");
|
||||
@ -363,7 +375,6 @@ public class UserApi {
|
||||
*/
|
||||
public void logoutUser () throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/logout".replaceAll("\\{format\\}","json");
|
||||
@ -413,12 +424,14 @@ public class UserApi {
|
||||
*/
|
||||
public void updateUser (String username, User body) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
|
||||
}
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||
|
@ -0,0 +1,86 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
/**
|
||||
* Describes the result of uploading an image resource
|
||||
**/
|
||||
@ApiModel(description = "Describes the result of uploading an image resource")
|
||||
public class ApiResponse {
|
||||
|
||||
@SerializedName("code")
|
||||
private Integer code = null;
|
||||
@SerializedName("type")
|
||||
private String type = null;
|
||||
@SerializedName("message")
|
||||
private String message = null;
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ApiResponse apiResponse = (ApiResponse) o;
|
||||
return (this.code == null ? apiResponse.code == null : this.code.equals(apiResponse.code)) &&
|
||||
(this.type == null ? apiResponse.type == null : this.type.equals(apiResponse.type)) &&
|
||||
(this.message == null ? apiResponse.message == null : this.message.equals(apiResponse.message));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 17;
|
||||
result = 31 * result + (this.code == null ? 0: this.code.hashCode());
|
||||
result = 31 * result + (this.type == null ? 0: this.type.hashCode());
|
||||
result = 31 * result + (this.message == null ? 0: this.message.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ApiResponse {\n");
|
||||
|
||||
sb.append(" code: ").append(code).append("\n");
|
||||
sb.append(" type: ").append(type).append("\n");
|
||||
sb.append(" message: ").append(message).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -5,7 +5,10 @@ import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* A category for a pet
|
||||
**/
|
||||
@ApiModel(description = "A category for a pet")
|
||||
public class Category {
|
||||
|
||||
@SerializedName("id")
|
||||
|
@ -6,7 +6,10 @@ import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
**/
|
||||
@ApiModel(description = "An order for a pets from the pet store")
|
||||
public class Order {
|
||||
|
||||
@SerializedName("id")
|
||||
|
@ -8,7 +8,10 @@ import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
**/
|
||||
@ApiModel(description = "A pet for sale in the pet store")
|
||||
public class Pet {
|
||||
|
||||
@SerializedName("id")
|
||||
|
@ -5,7 +5,10 @@ import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* A tag for a pet
|
||||
**/
|
||||
@ApiModel(description = "A tag for a pet")
|
||||
public class Tag {
|
||||
|
||||
@SerializedName("id")
|
||||
|
@ -5,7 +5,10 @@ import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
**/
|
||||
@ApiModel(description = "A User who is purchasing from the pet store")
|
||||
public class User {
|
||||
|
||||
@SerializedName("id")
|
||||
|
@ -106,6 +106,7 @@ Class | Method | HTTP request | Description
|
||||
|
||||
## Documentation for Models
|
||||
|
||||
- [ApiResponse](docs/ApiResponse.md)
|
||||
- [Category](docs/Category.md)
|
||||
- [Order](docs/Order.md)
|
||||
- [Pet](docs/Pet.md)
|
||||
@ -138,5 +139,5 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea
|
||||
|
||||
## Author
|
||||
|
||||
apiteam@wordnik.com
|
||||
apiteam@swagger.io
|
||||
|
||||
|
@ -6,8 +6,8 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
||||
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,11 +22,11 @@ apply plugin: 'com.android.library'
|
||||
apply plugin: 'com.github.dcendents.android-maven'
|
||||
|
||||
android {
|
||||
compileSdkVersion 23
|
||||
buildToolsVersion '23.0.2'
|
||||
compileSdkVersion 25
|
||||
buildToolsVersion '25.0.2'
|
||||
defaultConfig {
|
||||
minSdkVersion 14
|
||||
targetSdkVersion 23
|
||||
targetSdkVersion 25
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
|
12
samples/client/petstore/android/volley/docs/ApiResponse.md
Normal file
12
samples/client/petstore/android/volley/docs/ApiResponse.md
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
# ApiResponse
|
||||
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**code** | **Integer** | | [optional]
|
||||
**type** | **String** | | [optional]
|
||||
**message** | **String** | | [optional]
|
||||
|
||||
|
||||
|
@ -41,7 +41,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -54,7 +54,7 @@ null (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="deletePet"></a>
|
||||
# **deletePet**
|
||||
@ -98,7 +98,7 @@ null (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="findPetsByStatus"></a>
|
||||
# **findPetsByStatus**
|
||||
@ -114,7 +114,7 @@ Multiple status values can be provided with comma separated strings
|
||||
//import io.swagger.client.api.PetApi;
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
List<String> status = Arrays.asList("available"); // List<String> | Status values that need to be considered for filter
|
||||
List<String> status = Arrays.asList("status_example"); // List<String> | Status values that need to be considered for filter
|
||||
try {
|
||||
List<Pet> result = apiInstance.findPetsByStatus(status);
|
||||
System.out.println(result);
|
||||
@ -128,7 +128,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [optional] [default to available] [enum: available, pending, sold]
|
||||
**status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
|
||||
|
||||
### Return type
|
||||
|
||||
@ -141,7 +141,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="findPetsByTags"></a>
|
||||
# **findPetsByTags**
|
||||
@ -171,7 +171,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**List<String>**](String.md)| Tags to filter by | [optional]
|
||||
**tags** | [**List<String>**](String.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -184,7 +184,7 @@ Name | Type | Description | Notes
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="getPetById"></a>
|
||||
# **getPetById**
|
||||
@ -192,7 +192,7 @@ Name | Type | Description | Notes
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
Returns a single pet
|
||||
|
||||
### Example
|
||||
```java
|
||||
@ -200,7 +200,7 @@ Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API erro
|
||||
//import io.swagger.client.api.PetApi;
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 789L; // Long | ID of pet that needs to be fetched
|
||||
Long petId = 789L; // Long | ID of pet to return
|
||||
try {
|
||||
Pet result = apiInstance.getPetById(petId);
|
||||
System.out.println(result);
|
||||
@ -214,7 +214,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet that needs to be fetched |
|
||||
**petId** | **Long**| ID of pet to return |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -222,12 +222,12 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="updatePet"></a>
|
||||
# **updatePet**
|
||||
@ -256,7 +256,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
|
||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -269,7 +269,7 @@ null (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="updatePetWithForm"></a>
|
||||
# **updatePetWithForm**
|
||||
@ -285,7 +285,7 @@ Updates a pet in the store with form data
|
||||
//import io.swagger.client.api.PetApi;
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
String petId = "petId_example"; // String | ID of pet that needs to be updated
|
||||
Long petId = 789L; // Long | ID of pet that needs to be updated
|
||||
String name = "name_example"; // String | Updated name of the pet
|
||||
String status = "status_example"; // String | Updated status of the pet
|
||||
try {
|
||||
@ -300,7 +300,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **String**| ID of pet that needs to be updated |
|
||||
**petId** | **Long**| ID of pet that needs to be updated |
|
||||
**name** | **String**| Updated name of the pet | [optional]
|
||||
**status** | **String**| Updated status of the pet | [optional]
|
||||
|
||||
@ -315,11 +315,11 @@ null (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="uploadFile"></a>
|
||||
# **uploadFile**
|
||||
> uploadFile(petId, additionalMetadata, file)
|
||||
> ApiResponse uploadFile(petId, additionalMetadata, file)
|
||||
|
||||
uploads an image
|
||||
|
||||
@ -335,7 +335,8 @@ Long petId = 789L; // Long | ID of pet to update
|
||||
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
||||
File file = new File("/path/to/file.txt"); // File | file to upload
|
||||
try {
|
||||
apiInstance.uploadFile(petId, additionalMetadata, file);
|
||||
ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFile");
|
||||
e.printStackTrace();
|
||||
@ -352,7 +353,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
[**ApiResponse**](ApiResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -361,5 +362,5 @@ null (empty response body)
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/json
|
||||
|
||||
|
@ -50,7 +50,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="getInventory"></a>
|
||||
# **getInventory**
|
||||
@ -89,7 +89,7 @@ This endpoint does not need any parameter.
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/json
|
||||
|
||||
<a name="getOrderById"></a>
|
||||
# **getOrderById**
|
||||
@ -105,7 +105,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
|
||||
//import io.swagger.client.api.StoreApi;
|
||||
|
||||
StoreApi apiInstance = new StoreApi();
|
||||
String orderId = "orderId_example"; // String | ID of pet that needs to be fetched
|
||||
Long orderId = 789L; // Long | ID of pet that needs to be fetched
|
||||
try {
|
||||
Order result = apiInstance.getOrderById(orderId);
|
||||
System.out.println(result);
|
||||
@ -119,7 +119,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **String**| ID of pet that needs to be fetched |
|
||||
**orderId** | **Long**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -132,7 +132,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="placeOrder"></a>
|
||||
# **placeOrder**
|
||||
@ -162,7 +162,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
|
||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -175,5 +175,5 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
@ -41,7 +41,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**User**](User.md)| Created user object | [optional]
|
||||
**body** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -54,7 +54,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="createUsersWithArrayInput"></a>
|
||||
# **createUsersWithArrayInput**
|
||||
@ -83,7 +83,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object | [optional]
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -96,7 +96,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="createUsersWithListInput"></a>
|
||||
# **createUsersWithListInput**
|
||||
@ -125,7 +125,7 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**List<User>**](User.md)| List of user object | [optional]
|
||||
**body** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -138,7 +138,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="deleteUser"></a>
|
||||
# **deleteUser**
|
||||
@ -180,7 +180,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="getUserByName"></a>
|
||||
# **getUserByName**
|
||||
@ -223,7 +223,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="loginUser"></a>
|
||||
# **loginUser**
|
||||
@ -254,8 +254,8 @@ try {
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The user name for login | [optional]
|
||||
**password** | **String**| The password for login in clear text | [optional]
|
||||
**username** | **String**| The user name for login |
|
||||
**password** | **String**| The password for login in clear text |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -268,7 +268,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="logoutUser"></a>
|
||||
# **logoutUser**
|
||||
@ -306,7 +306,7 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
<a name="updateUser"></a>
|
||||
# **updateUser**
|
||||
@ -337,7 +337,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| name that need to be deleted |
|
||||
**body** | [**User**](User.md)| Updated user object | [optional]
|
||||
**body** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -350,5 +350,5 @@ No authorization required
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json, application/xml
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -57,6 +57,10 @@ public class JsonUtil {
|
||||
public static Type getListTypeForDeserialization(Class cls) {
|
||||
String className = cls.getSimpleName();
|
||||
|
||||
if ("ApiResponse".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<List<ApiResponse>>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Category".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<List<Category>>(){}.getType();
|
||||
}
|
||||
@ -83,6 +87,10 @@ public class JsonUtil {
|
||||
public static Type getTypeForDeserialization(Class cls) {
|
||||
String className = cls.getSimpleName();
|
||||
|
||||
if ("ApiResponse".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<ApiResponse>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Category".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<Category>(){}.getType();
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -23,6 +23,7 @@ import java.util.*;
|
||||
import com.android.volley.Response;
|
||||
import com.android.volley.VolleyError;
|
||||
|
||||
import io.swagger.client.model.ApiResponse;
|
||||
import java.io.File;
|
||||
import io.swagger.client.model.Pet;
|
||||
|
||||
@ -64,6 +65,11 @@ public class PetApi {
|
||||
*/
|
||||
public void addPet (Pet body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
Object postBody = body;
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling addPet",
|
||||
new ApiException(400, "Missing the required parameter 'body' when calling addPet"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet";
|
||||
@ -103,15 +109,15 @@ public class PetApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,7 +129,11 @@ public class PetApi {
|
||||
public void addPet (Pet body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = body;
|
||||
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling addPet",
|
||||
new ApiException(400, "Missing the required parameter 'body' when calling addPet"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
||||
@ -153,7 +163,7 @@ public class PetApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -224,15 +234,15 @@ public class PetApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -244,13 +254,11 @@ public class PetApi {
|
||||
public void deletePet (Long petId, String apiKey, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = null;
|
||||
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'petId' when calling deletePet",
|
||||
new ApiException(400, "Missing the required parameter 'petId' when calling deletePet"));
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'petId' when calling deletePet",
|
||||
new ApiException(400, "Missing the required parameter 'petId' when calling deletePet"));
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
@ -281,7 +289,7 @@ public class PetApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -308,6 +316,11 @@ public class PetApi {
|
||||
*/
|
||||
public List<Pet> findPetsByStatus (List<String> status) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
Object postBody = null;
|
||||
// verify the required parameter 'status' is set
|
||||
if (status == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'status' when calling findPetsByStatus",
|
||||
new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet/findByStatus";
|
||||
@ -318,7 +331,7 @@ public class PetApi {
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
// form params
|
||||
Map<String, String> formParams = new HashMap<String, String>();
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "status", status));
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("csv", "status", status));
|
||||
String[] contentTypes = {
|
||||
};
|
||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||
@ -346,15 +359,15 @@ public class PetApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -366,7 +379,11 @@ public class PetApi {
|
||||
public void findPetsByStatus (List<String> status, final Response.Listener<List<Pet>> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = null;
|
||||
|
||||
|
||||
// verify the required parameter 'status' is set
|
||||
if (status == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'status' when calling findPetsByStatus",
|
||||
new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
||||
@ -378,7 +395,7 @@ public class PetApi {
|
||||
// form params
|
||||
Map<String, String> formParams = new HashMap<String, String>();
|
||||
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "status", status));
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("csv", "status", status));
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
@ -397,7 +414,7 @@ public class PetApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -428,6 +445,11 @@ public class PetApi {
|
||||
*/
|
||||
public List<Pet> findPetsByTags (List<String> tags) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
Object postBody = null;
|
||||
// verify the required parameter 'tags' is set
|
||||
if (tags == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'tags' when calling findPetsByTags",
|
||||
new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet/findByTags";
|
||||
@ -438,7 +460,7 @@ public class PetApi {
|
||||
Map<String, String> headerParams = new HashMap<String, String>();
|
||||
// form params
|
||||
Map<String, String> formParams = new HashMap<String, String>();
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "tags", tags));
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("csv", "tags", tags));
|
||||
String[] contentTypes = {
|
||||
};
|
||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||
@ -466,15 +488,15 @@ public class PetApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -486,7 +508,11 @@ public class PetApi {
|
||||
public void findPetsByTags (List<String> tags, final Response.Listener<List<Pet>> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = null;
|
||||
|
||||
|
||||
// verify the required parameter 'tags' is set
|
||||
if (tags == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'tags' when calling findPetsByTags",
|
||||
new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
||||
@ -498,7 +524,7 @@ public class PetApi {
|
||||
// form params
|
||||
Map<String, String> formParams = new HashMap<String, String>();
|
||||
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "tags", tags));
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("csv", "tags", tags));
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
@ -517,7 +543,7 @@ public class PetApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -542,8 +568,8 @@ public class PetApi {
|
||||
}
|
||||
/**
|
||||
* Find pet by ID
|
||||
* 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
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return
|
||||
* @return Pet
|
||||
*/
|
||||
public Pet getPetById (Long petId) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
@ -576,7 +602,7 @@ public class PetApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||
String[] authNames = new String[] { "api_key" };
|
||||
|
||||
try {
|
||||
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
||||
@ -590,33 +616,31 @@ public class PetApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* 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
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return
|
||||
*/
|
||||
public void getPetById (Long petId, final Response.Listener<Pet> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = null;
|
||||
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'petId' when calling getPetById",
|
||||
new ApiException(400, "Missing the required parameter 'petId' when calling getPetById"));
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'petId' when calling getPetById",
|
||||
new ApiException(400, "Missing the required parameter 'petId' when calling getPetById"));
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
@ -646,7 +670,7 @@ public class PetApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||
String[] authNames = new String[] { "api_key" };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -677,6 +701,11 @@ public class PetApi {
|
||||
*/
|
||||
public void updatePet (Pet body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
Object postBody = body;
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling updatePet",
|
||||
new ApiException(400, "Missing the required parameter 'body' when calling updatePet"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet";
|
||||
@ -716,15 +745,15 @@ public class PetApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -736,7 +765,11 @@ public class PetApi {
|
||||
public void updatePet (Pet body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = body;
|
||||
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling updatePet",
|
||||
new ApiException(400, "Missing the required parameter 'body' when calling updatePet"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
||||
@ -766,7 +799,7 @@ public class PetApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -793,7 +826,7 @@ public class PetApi {
|
||||
* @param status Updated status of the pet
|
||||
* @return void
|
||||
*/
|
||||
public void updatePetWithForm (String petId, String name, String status) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
public void updatePetWithForm (Long petId, String name, String status) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
Object postBody = null;
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@ -846,15 +879,15 @@ public class PetApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -863,16 +896,14 @@ public class PetApi {
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated * @param name Updated name of the pet * @param status Updated status of the pet
|
||||
*/
|
||||
public void updatePetWithForm (String petId, String name, String status, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||
public void updatePetWithForm (Long petId, String name, String status, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = null;
|
||||
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'petId' when calling updatePetWithForm",
|
||||
new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm"));
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'petId' when calling updatePetWithForm",
|
||||
new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm"));
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
@ -912,7 +943,7 @@ public class PetApi {
|
||||
formParams.put("status", ApiInvoker.parameterToString(status));
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -937,9 +968,9 @@ formParams.put("status", ApiInvoker.parameterToString(status));
|
||||
* @param petId ID of pet to update
|
||||
* @param additionalMetadata Additional data to pass to server
|
||||
* @param file file to upload
|
||||
* @return void
|
||||
* @return ApiResponse
|
||||
*/
|
||||
public void uploadFile (Long petId, String additionalMetadata, File file) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
public ApiResponse uploadFile (Long petId, String additionalMetadata, File file) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
Object postBody = null;
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@ -982,24 +1013,24 @@ formParams.put("status", ApiInvoker.parameterToString(status));
|
||||
try {
|
||||
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
||||
if (localVarResponse != null) {
|
||||
return ;
|
||||
return (ApiResponse) ApiInvoker.deserialize(localVarResponse, "", ApiResponse.class);
|
||||
} else {
|
||||
return ;
|
||||
return null;
|
||||
}
|
||||
} catch (ApiException ex) {
|
||||
throw ex;
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1008,16 +1039,14 @@ formParams.put("status", ApiInvoker.parameterToString(status));
|
||||
*
|
||||
* @param petId ID of pet to update * @param additionalMetadata Additional data to pass to server * @param file file to upload
|
||||
*/
|
||||
public void uploadFile (Long petId, String additionalMetadata, File file, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||
public void uploadFile (Long petId, String additionalMetadata, File file, final Response.Listener<ApiResponse> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = null;
|
||||
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'petId' when calling uploadFile",
|
||||
new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile"));
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'petId' when calling uploadFile",
|
||||
new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile"));
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
@ -1057,14 +1086,18 @@ formParams.put("status", ApiInvoker.parameterToString(status));
|
||||
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
responseListener.onResponse(localVarResponse);
|
||||
try {
|
||||
responseListener.onResponse((ApiResponse) ApiInvoker.deserialize(localVarResponse, "", ApiResponse.class));
|
||||
} catch (ApiException exception) {
|
||||
errorListener.onErrorResponse(new VolleyError(exception));
|
||||
}
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -106,15 +106,15 @@ public class StoreApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,13 +126,11 @@ public class StoreApi {
|
||||
public void deleteOrder (String orderId, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = null;
|
||||
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'orderId' when calling deleteOrder",
|
||||
new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder"));
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'orderId' when calling deleteOrder",
|
||||
new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder"));
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
||||
@ -162,7 +160,7 @@ public class StoreApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -225,15 +223,15 @@ public class StoreApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -245,7 +243,6 @@ public class StoreApi {
|
||||
public void getInventory (final Response.Listener<Map<String, Integer>> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = null;
|
||||
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/store/inventory".replaceAll("\\{format\\}","json");
|
||||
@ -275,7 +272,7 @@ public class StoreApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "api_key" };
|
||||
String[] authNames = new String[] { "api_key" };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -304,7 +301,7 @@ public class StoreApi {
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
* @return Order
|
||||
*/
|
||||
public Order getOrderById (String orderId) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
public Order getOrderById (Long orderId) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
Object postBody = null;
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
@ -348,15 +345,15 @@ public class StoreApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -365,16 +362,14 @@ public class StoreApi {
|
||||
* 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
|
||||
*/
|
||||
public void getOrderById (String orderId, final Response.Listener<Order> responseListener, final Response.ErrorListener errorListener) {
|
||||
public void getOrderById (Long orderId, final Response.Listener<Order> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = null;
|
||||
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'orderId' when calling getOrderById",
|
||||
new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById"));
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'orderId' when calling getOrderById",
|
||||
new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById"));
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
||||
@ -404,7 +399,7 @@ public class StoreApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -435,6 +430,11 @@ public class StoreApi {
|
||||
*/
|
||||
public Order placeOrder (Order body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
Object postBody = body;
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling placeOrder",
|
||||
new ApiException(400, "Missing the required parameter 'body' when calling placeOrder"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/store/order";
|
||||
@ -472,15 +472,15 @@ public class StoreApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -492,7 +492,11 @@ public class StoreApi {
|
||||
public void placeOrder (Order body, final Response.Listener<Order> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = body;
|
||||
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling placeOrder",
|
||||
new ApiException(400, "Missing the required parameter 'body' when calling placeOrder"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/store/order".replaceAll("\\{format\\}","json");
|
||||
@ -522,7 +526,7 @@ public class StoreApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -64,6 +64,11 @@ public class UserApi {
|
||||
*/
|
||||
public void createUser (User body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
Object postBody = body;
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUser",
|
||||
new ApiException(400, "Missing the required parameter 'body' when calling createUser"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/user";
|
||||
@ -101,15 +106,15 @@ public class UserApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -121,7 +126,11 @@ public class UserApi {
|
||||
public void createUser (User body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = body;
|
||||
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUser",
|
||||
new ApiException(400, "Missing the required parameter 'body' when calling createUser"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/user".replaceAll("\\{format\\}","json");
|
||||
@ -151,7 +160,7 @@ public class UserApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -178,6 +187,11 @@ public class UserApi {
|
||||
*/
|
||||
public void createUsersWithArrayInput (List<User> body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
Object postBody = body;
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUsersWithArrayInput",
|
||||
new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/user/createWithArray";
|
||||
@ -215,15 +229,15 @@ public class UserApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,7 +249,11 @@ public class UserApi {
|
||||
public void createUsersWithArrayInput (List<User> body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = body;
|
||||
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUsersWithArrayInput",
|
||||
new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
||||
@ -265,7 +283,7 @@ public class UserApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -292,6 +310,11 @@ public class UserApi {
|
||||
*/
|
||||
public void createUsersWithListInput (List<User> body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
Object postBody = body;
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUsersWithListInput",
|
||||
new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/user/createWithList";
|
||||
@ -329,15 +352,15 @@ public class UserApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -349,7 +372,11 @@ public class UserApi {
|
||||
public void createUsersWithListInput (List<User> body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = body;
|
||||
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUsersWithListInput",
|
||||
new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/user/createWithList".replaceAll("\\{format\\}","json");
|
||||
@ -379,7 +406,7 @@ public class UserApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -448,15 +475,15 @@ public class UserApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -468,13 +495,11 @@ public class UserApi {
|
||||
public void deleteUser (String username, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = null;
|
||||
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'username' when calling deleteUser",
|
||||
new ApiException(400, "Missing the required parameter 'username' when calling deleteUser"));
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'username' when calling deleteUser",
|
||||
new ApiException(400, "Missing the required parameter 'username' when calling deleteUser"));
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||
@ -504,7 +529,7 @@ public class UserApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -573,15 +598,15 @@ public class UserApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -593,13 +618,11 @@ public class UserApi {
|
||||
public void getUserByName (String username, final Response.Listener<User> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = null;
|
||||
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'username' when calling getUserByName",
|
||||
new ApiException(400, "Missing the required parameter 'username' when calling getUserByName"));
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'username' when calling getUserByName",
|
||||
new ApiException(400, "Missing the required parameter 'username' when calling getUserByName"));
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||
@ -629,7 +652,7 @@ public class UserApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -661,6 +684,16 @@ public class UserApi {
|
||||
*/
|
||||
public String loginUser (String username, String password) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||
Object postBody = null;
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'username' when calling loginUser",
|
||||
new ApiException(400, "Missing the required parameter 'username' when calling loginUser"));
|
||||
}
|
||||
// verify the required parameter 'password' is set
|
||||
if (password == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'password' when calling loginUser",
|
||||
new ApiException(400, "Missing the required parameter 'password' when calling loginUser"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/user/login";
|
||||
@ -700,15 +733,15 @@ public class UserApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -720,7 +753,16 @@ public class UserApi {
|
||||
public void loginUser (String username, String password, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = null;
|
||||
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'username' when calling loginUser",
|
||||
new ApiException(400, "Missing the required parameter 'username' when calling loginUser"));
|
||||
}
|
||||
// verify the required parameter 'password' is set
|
||||
if (password == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'password' when calling loginUser",
|
||||
new ApiException(400, "Missing the required parameter 'password' when calling loginUser"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/user/login".replaceAll("\\{format\\}","json");
|
||||
@ -752,7 +794,7 @@ public class UserApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -819,15 +861,15 @@ public class UserApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -839,7 +881,6 @@ public class UserApi {
|
||||
public void logoutUser (final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = null;
|
||||
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/user/logout".replaceAll("\\{format\\}","json");
|
||||
@ -869,7 +910,7 @@ public class UserApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
@ -902,6 +943,11 @@ public class UserApi {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'username' when calling updateUser",
|
||||
new ApiException(400, "Missing the required parameter 'username' when calling updateUser"));
|
||||
}
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling updateUser",
|
||||
new ApiException(400, "Missing the required parameter 'body' when calling updateUser"));
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String path = "/user/{username}".replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||
@ -939,15 +985,15 @@ public class UserApi {
|
||||
} catch (InterruptedException ex) {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
if (ex.getCause() instanceof VolleyError) {
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
throw ex;
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -959,13 +1005,16 @@ public class UserApi {
|
||||
public void updateUser (String username, User body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||
Object postBody = body;
|
||||
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'username' when calling updateUser",
|
||||
new ApiException(400, "Missing the required parameter 'username' when calling updateUser"));
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'username' when calling updateUser",
|
||||
new ApiException(400, "Missing the required parameter 'username' when calling updateUser"));
|
||||
}
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling updateUser",
|
||||
new ApiException(400, "Missing the required parameter 'body' when calling updateUser"));
|
||||
}
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||
@ -995,7 +1044,7 @@ public class UserApi {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
|
@ -0,0 +1,96 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
package io.swagger.client.model;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
/**
|
||||
* Describes the result of uploading an image resource
|
||||
**/
|
||||
@ApiModel(description = "Describes the result of uploading an image resource")
|
||||
public class ApiResponse {
|
||||
|
||||
@SerializedName("code")
|
||||
private Integer code = null;
|
||||
@SerializedName("type")
|
||||
private String type = null;
|
||||
@SerializedName("message")
|
||||
private String message = null;
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ApiResponse apiResponse = (ApiResponse) o;
|
||||
return (this.code == null ? apiResponse.code == null : this.code.equals(apiResponse.code)) &&
|
||||
(this.type == null ? apiResponse.type == null : this.type.equals(apiResponse.type)) &&
|
||||
(this.message == null ? apiResponse.message == null : this.message.equals(apiResponse.message));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 17;
|
||||
result = 31 * result + (this.code == null ? 0: this.code.hashCode());
|
||||
result = 31 * result + (this.type == null ? 0: this.type.hashCode());
|
||||
result = 31 * result + (this.message == null ? 0: this.message.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ApiResponse {\n");
|
||||
|
||||
sb.append(" code: ").append(code).append("\n");
|
||||
sb.append(" type: ").append(type).append("\n");
|
||||
sb.append(" message: ").append(message).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -15,7 +15,10 @@ package io.swagger.client.model;
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* A category for a pet
|
||||
**/
|
||||
@ApiModel(description = "A category for a pet")
|
||||
public class Category {
|
||||
|
||||
@SerializedName("id")
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -16,7 +16,10 @@ import java.util.Date;
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
**/
|
||||
@ApiModel(description = "An order for a pets from the pet store")
|
||||
public class Order {
|
||||
|
||||
@SerializedName("id")
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -18,7 +18,10 @@ import java.util.*;
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
**/
|
||||
@ApiModel(description = "A pet for sale in the pet store")
|
||||
public class Pet {
|
||||
|
||||
@SerializedName("id")
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -15,7 +15,10 @@ package io.swagger.client.model;
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* A tag for a pet
|
||||
**/
|
||||
@ApiModel(description = "A tag for a pet")
|
||||
public class Tag {
|
||||
|
||||
@SerializedName("id")
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
@ -15,7 +15,10 @@ package io.swagger.client.model;
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
**/
|
||||
@ApiModel(description = "A User who is purchasing from the pet store")
|
||||
public class User {
|
||||
|
||||
@SerializedName("id")
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
|
@ -1,9 +1,9 @@
|
||||
/**
|
||||
* Swagger Petstore
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
* Contact: apiteam@wordnik.com
|
||||
* Contact: apiteam@swagger.io
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen.git
|
||||
|
@ -1,6 +1,5 @@
|
||||
package io.swagger.api;
|
||||
|
||||
import io.swagger.model.ModelApiResponse;
|
||||
import io.swagger.model.Pet;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
@ -35,7 +34,7 @@ public interface PetApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.POST)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body, @RequestHeader("Accept") String accept);
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ) @Valid @RequestBody Pet body);
|
||||
|
||||
|
||||
@ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = {
|
||||
@ -50,7 +49,7 @@ public interface PetApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.DELETE)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> deletePet(@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey, @RequestHeader("Accept") String accept);
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> deletePet(@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) String apiKey);
|
||||
|
||||
|
||||
@ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
|
||||
@ -66,7 +65,7 @@ public interface PetApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.GET)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<List<Pet>>> findPetsByStatus( @NotNull@ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List<String> status, @RequestHeader("Accept") String accept) throws IOException;
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<List<Pet>>> findPetsByStatus(@ApiParam(value = "Status values that need to be considered for filter", allowableValues = "available, pending, sold", defaultValue = "available") @RequestParam(value = "status", required = false, defaultValue="available") List<String> status);
|
||||
|
||||
|
||||
@ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
|
||||
@ -82,10 +81,14 @@ public interface PetApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.GET)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<List<Pet>>> findPetsByTags( @NotNull@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags, @RequestHeader("Accept") String accept) throws IOException;
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<List<Pet>>> findPetsByTags(@ApiParam(value = "Tags to filter by") @RequestParam(value = "tags", required = false) List<String> tags);
|
||||
|
||||
|
||||
@ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
|
||||
@ApiOperation(value = "Find pet by ID", notes = "Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions", response = Pet.class, authorizations = {
|
||||
@Authorization(value = "petstore_auth", scopes = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
}),
|
||||
@Authorization(value = "api_key")
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ -96,7 +99,7 @@ public interface PetApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.GET)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Pet>> getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId, @RequestHeader("Accept") String accept) throws IOException;
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Pet>> getPetById(@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("petId") Long petId);
|
||||
|
||||
|
||||
@ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
|
||||
@ -113,7 +116,7 @@ public interface PetApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.PUT)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body, @RequestHeader("Accept") String accept);
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ) @Valid @RequestBody Pet body);
|
||||
|
||||
|
||||
@ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = {
|
||||
@ -128,21 +131,21 @@ public interface PetApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/x-www-form-urlencoded",
|
||||
method = RequestMethod.POST)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status, @RequestHeader("Accept") String accept);
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") String petId,@ApiParam(value = "Updated name of the pet" ) @RequestParam(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet" ) @RequestParam(value="status", required=false) String status);
|
||||
|
||||
|
||||
@ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
|
||||
@ApiOperation(value = "uploads an image", notes = "", response = Void.class, authorizations = {
|
||||
@Authorization(value = "petstore_auth", scopes = {
|
||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||
})
|
||||
}, tags={ "pet", })
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||
@RequestMapping(value = "/pet/{petId}/uploadImage",
|
||||
produces = "application/json",
|
||||
consumes = "multipart/form-data",
|
||||
method = RequestMethod.POST)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<ModelApiResponse>> uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestParam("file") MultipartFile file, @RequestHeader("Accept") String accept) throws IOException;
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server" ) @RequestParam(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestParam("file") MultipartFile file);
|
||||
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ public interface StoreApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.DELETE)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId, @RequestHeader("Accept") String accept);
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("orderId") String orderId);
|
||||
|
||||
|
||||
@ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
|
||||
@ -42,7 +42,7 @@ public interface StoreApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.GET)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Map<String, Integer>>> getInventory( @RequestHeader("Accept") String accept) throws IOException;
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Map<String, Integer>>> getInventory();
|
||||
|
||||
|
||||
@ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
|
||||
@ -54,7 +54,7 @@ public interface StoreApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.GET)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Order>> getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") Long orderId, @RequestHeader("Accept") String accept) throws IOException;
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Order>> getOrderById(@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("orderId") String orderId);
|
||||
|
||||
|
||||
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", })
|
||||
@ -65,6 +65,6 @@ public interface StoreApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.POST)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Order>> placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody Order body, @RequestHeader("Accept") String accept) throws IOException;
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Order>> placeOrder(@ApiParam(value = "order placed for purchasing the pet" ) @Valid @RequestBody Order body);
|
||||
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ public interface UserApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.POST)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody User body, @RequestHeader("Accept") String accept);
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> createUser(@ApiParam(value = "Created user object" ) @Valid @RequestBody User body);
|
||||
|
||||
|
||||
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
|
||||
@ -39,7 +39,7 @@ public interface UserApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.POST)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List<User> body, @RequestHeader("Accept") String accept);
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> createUsersWithArrayInput(@ApiParam(value = "List of user object" ) @Valid @RequestBody List<User> body);
|
||||
|
||||
|
||||
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
|
||||
@ -49,7 +49,7 @@ public interface UserApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.POST)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List<User> body, @RequestHeader("Accept") String accept);
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> createUsersWithListInput(@ApiParam(value = "List of user object" ) @Valid @RequestBody List<User> body);
|
||||
|
||||
|
||||
@ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
|
||||
@ -60,7 +60,7 @@ public interface UserApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.DELETE)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true ) @PathVariable("username") String username, @RequestHeader("Accept") String accept);
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true ) @PathVariable("username") String username);
|
||||
|
||||
|
||||
@ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
|
||||
@ -72,7 +72,7 @@ public interface UserApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.GET)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<User>> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true ) @PathVariable("username") String username, @RequestHeader("Accept") String accept) throws IOException;
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<User>> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true ) @PathVariable("username") String username);
|
||||
|
||||
|
||||
@ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
|
||||
@ -83,7 +83,7 @@ public interface UserApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.GET)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<String>> loginUser( @NotNull@ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username, @NotNull@ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password, @RequestHeader("Accept") String accept) throws IOException;
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<String>> loginUser(@ApiParam(value = "The user name for login") @RequestParam(value = "username", required = false) String username,@ApiParam(value = "The password for login in clear text") @RequestParam(value = "password", required = false) String password);
|
||||
|
||||
|
||||
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", })
|
||||
@ -93,7 +93,7 @@ public interface UserApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.GET)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> logoutUser( @RequestHeader("Accept") String accept);
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> logoutUser();
|
||||
|
||||
|
||||
@ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
|
||||
@ -104,6 +104,6 @@ public interface UserApi {
|
||||
produces = "application/json",
|
||||
consumes = "application/json",
|
||||
method = RequestMethod.PUT)
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> updateUser(@ApiParam(value = "name that need to be deleted",required=true ) @PathVariable("username") String username,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody User body, @RequestHeader("Accept") String accept);
|
||||
com.netflix.hystrix.HystrixCommand<ResponseEntity<Void>> updateUser(@ApiParam(value = "name that need to be deleted",required=true ) @PathVariable("username") String username,@ApiParam(value = "Updated user object" ) @Valid @RequestBody User body);
|
||||
|
||||
}
|
||||
|
@ -9,9 +9,8 @@ import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* A category for a pet
|
||||
* Category
|
||||
*/
|
||||
@ApiModel(description = "A category for a pet")
|
||||
|
||||
public class Category {
|
||||
@JsonProperty("id")
|
||||
|
@ -1,129 +0,0 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* Describes the result of uploading an image resource
|
||||
*/
|
||||
@ApiModel(description = "Describes the result of uploading an image resource")
|
||||
|
||||
public class ModelApiResponse {
|
||||
@JsonProperty("code")
|
||||
private Integer code = null;
|
||||
|
||||
@JsonProperty("type")
|
||||
private String type = null;
|
||||
|
||||
@JsonProperty("message")
|
||||
private String message = null;
|
||||
|
||||
public ModelApiResponse code(Integer code) {
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get code
|
||||
* @return code
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public ModelApiResponse type(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get type
|
||||
* @return type
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public ModelApiResponse message(String message) {
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get message
|
||||
* @return message
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
@Valid
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
ModelApiResponse _apiResponse = (ModelApiResponse) o;
|
||||
return Objects.equals(this.code, _apiResponse.code) &&
|
||||
Objects.equals(this.type, _apiResponse.type) &&
|
||||
Objects.equals(this.message, _apiResponse.message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(code, type, message);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class ModelApiResponse {\n");
|
||||
|
||||
sb.append(" code: ").append(toIndentedString(code)).append("\n");
|
||||
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append(" message: ").append(toIndentedString(message)).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 ");
|
||||
}
|
||||
}
|
||||
|
@ -11,9 +11,8 @@ import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
* Order
|
||||
*/
|
||||
@ApiModel(description = "An order for a pets from the pet store")
|
||||
|
||||
public class Order {
|
||||
@JsonProperty("id")
|
||||
@ -65,7 +64,7 @@ public class Order {
|
||||
private StatusEnum status = null;
|
||||
|
||||
@JsonProperty("complete")
|
||||
private Boolean complete = false;
|
||||
private Boolean complete = null;
|
||||
|
||||
public Order id(Long id) {
|
||||
this.id = id;
|
||||
|
@ -14,9 +14,8 @@ import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
* Pet
|
||||
*/
|
||||
@ApiModel(description = "A pet for sale in the pet store")
|
||||
|
||||
public class Pet {
|
||||
@JsonProperty("id")
|
||||
|
@ -9,9 +9,8 @@ import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* A tag for a pet
|
||||
* Tag
|
||||
*/
|
||||
@ApiModel(description = "A tag for a pet")
|
||||
|
||||
public class Tag {
|
||||
@JsonProperty("id")
|
||||
|
@ -9,9 +9,8 @@ import javax.validation.Valid;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
* User
|
||||
*/
|
||||
@ApiModel(description = "A User who is purchasing from the pet store")
|
||||
|
||||
public class User {
|
||||
@JsonProperty("id")
|
||||
|
@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
@ -12,7 +12,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
@ -13,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RequestPart;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import java.io.IOException;
|
||||
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
Loading…
Reference in New Issue
Block a user