forked from loafle/openapi-generator-original
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)) {
|
if (!additionalProperties.containsKey(SINGLE_CONTENT_TYPES)) {
|
||||||
additionalProperties.put(SINGLE_CONTENT_TYPES, "true");
|
additionalProperties.put(SINGLE_CONTENT_TYPES, "true");
|
||||||
this.setSingleContentTypes(true);
|
this.setSingleContentTypes(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
additionalProperties.put("useSpringCloudClient", true);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
apiTemplateFiles.put("apiController.mustache", "Controller.java");
|
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.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
{{#useSpringCloudClient}}
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
{{/useSpringCloudClient}}
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
{{#async}}
|
{{#async}}
|
||||||
@ -52,11 +54,20 @@ public interface {{classname}} {
|
|||||||
produces = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }, {{/hasProduces}}{{#hasConsumes}}
|
produces = { {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }, {{/hasProduces}}{{#hasConsumes}}
|
||||||
consumes = { {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} },{{/hasConsumes}}{{/singleContentTypes}}
|
consumes = { {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} },{{/hasConsumes}}{{/singleContentTypes}}
|
||||||
method = RequestMethod.{{httpMethod}})
|
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}} {
|
{{#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!
|
// do some magic!
|
||||||
return {{#async}}CompletableFuture.completedFuture({{/async}}new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK){{#async}}){{/async}};
|
return {{#async}}CompletableFuture.completedFuture({{/async}}new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK){{#async}}){{/async}};
|
||||||
}{{/jdk8}}
|
}{{/jdk8}}
|
||||||
|
|
||||||
|
{{/useSpringCloudClient}}
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
}
|
}
|
||||||
{{/operations}}
|
{{/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.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
{{^useSpringCloudClient}}
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
{{/useSpringCloudClient}}
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
{{#async}}
|
{{#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}},
|
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}} {
|
{{/allParams}}@RequestHeader("Accept") String accept){{#examples}}{{#-first}} throws IOException{{/-first}}{{/examples}} {
|
||||||
// do some magic!
|
// 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}}
|
{{^isDelegate}}
|
||||||
{{^async}}
|
{{^async}}
|
||||||
{{#examples}}
|
{{#examples}}
|
||||||
@ -75,6 +96,7 @@ public class {{classname}}Controller implements {{classname}} {
|
|||||||
{{#isDelegate}}
|
{{#isDelegate}}
|
||||||
return delegate.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
return delegate.{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||||
{{/isDelegate}}
|
{{/isDelegate}}
|
||||||
|
{{/useSpringCloudClient}}
|
||||||
}
|
}
|
||||||
|
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
|
@ -48,12 +48,14 @@ public class {{classname}} {
|
|||||||
*/
|
*/
|
||||||
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||||
Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||||
{{#allParams}}{{#required}}
|
{{#allParams}}
|
||||||
|
{{#required}}
|
||||||
// verify the required parameter '{{paramName}}' is set
|
// verify the required parameter '{{paramName}}' is set
|
||||||
if ({{paramName}} == null) {
|
if ({{paramName}} == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{nickname}}");
|
throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{nickname}}");
|
||||||
}
|
}
|
||||||
{{/required}}{{/allParams}}
|
{{/required}}
|
||||||
|
{{/allParams}}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String localVarPath = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}}.replaceAll("\\{" + "{{baseName}}" + "\\}", apiInvoker.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
String localVarPath = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}}.replaceAll("\\{" + "{{baseName}}" + "\\}", apiInvoker.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
||||||
|
@ -127,15 +127,15 @@ public class {{classname}} {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
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}};
|
Object postBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||||
|
|
||||||
{{#allParams}}{{#required}}
|
{{#allParams}}
|
||||||
|
{{#required}}
|
||||||
// verify the required parameter '{{paramName}}' is set
|
// verify the required parameter '{{paramName}}' is set
|
||||||
if ({{paramName}} == null) {
|
if ({{paramName}} == null) {
|
||||||
VolleyError error = new VolleyError("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}}"));
|
new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{nickname}}"));
|
||||||
}
|
}
|
||||||
{{/required}}{{/allParams}}
|
{{/required}}
|
||||||
|
{{/allParams}}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}}.replaceAll("\\{" + "{{baseName}}" + "\\}", apiInvoker.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
String path = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}}.replaceAll("\\{" + "{{baseName}}" + "\\}", apiInvoker.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
||||||
@ -199,7 +201,7 @@ public class {{classname}} {
|
|||||||
{{/formParams}}
|
{{/formParams}}
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} };
|
String[] authNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "{{httpMethod}}", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
apiInvoker.invokeAPI(basePath, path, "{{httpMethod}}", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"swagger": "2.0",
|
"swagger": "2.0",
|
||||||
"info": {
|
"info": {
|
||||||
|
@ -1,29 +1,20 @@
|
|||||||
swagger: '2.0'
|
swagger: '2.0'
|
||||||
info:
|
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
|
version: 1.0.0
|
||||||
title: Swagger Petstore
|
title: Swagger Petstore
|
||||||
termsOfService: 'http://swagger.io/terms/'
|
termsOfService: 'http://helloreverb.com/terms/'
|
||||||
contact:
|
contact:
|
||||||
email: apiteam@swagger.io
|
email: apiteam@wordnik.com
|
||||||
license:
|
license:
|
||||||
name: Apache 2.0
|
name: Apache 2.0
|
||||||
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
|
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
|
||||||
host: petstore.swagger.io
|
host: petstore.swagger.io
|
||||||
basePath: /v2
|
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:
|
schemes:
|
||||||
- http
|
- http
|
||||||
paths:
|
paths:
|
||||||
@ -38,13 +29,13 @@ paths:
|
|||||||
- application/json
|
- application/json
|
||||||
- application/xml
|
- application/xml
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- in: body
|
- in: body
|
||||||
name: body
|
name: body
|
||||||
description: Pet object that needs to be added to the store
|
description: Pet object that needs to be added to the store
|
||||||
required: true
|
required: false
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/Pet'
|
$ref: '#/definitions/Pet'
|
||||||
responses:
|
responses:
|
||||||
@ -64,13 +55,13 @@ paths:
|
|||||||
- application/json
|
- application/json
|
||||||
- application/xml
|
- application/xml
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- in: body
|
- in: body
|
||||||
name: body
|
name: body
|
||||||
description: Pet object that needs to be added to the store
|
description: Pet object that needs to be added to the store
|
||||||
required: true
|
required: false
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/Pet'
|
$ref: '#/definitions/Pet'
|
||||||
responses:
|
responses:
|
||||||
@ -92,13 +83,13 @@ paths:
|
|||||||
description: Multiple status values can be provided with comma separated strings
|
description: Multiple status values can be provided with comma separated strings
|
||||||
operationId: findPetsByStatus
|
operationId: findPetsByStatus
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- name: status
|
- name: status
|
||||||
in: query
|
in: query
|
||||||
description: Status values that need to be considered for filter
|
description: Status values that need to be considered for filter
|
||||||
required: true
|
required: false
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
@ -106,8 +97,8 @@ paths:
|
|||||||
- available
|
- available
|
||||||
- pending
|
- pending
|
||||||
- sold
|
- sold
|
||||||
default: available
|
collectionFormat: multi
|
||||||
collectionFormat: csv
|
default: available
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
@ -115,6 +106,13 @@ paths:
|
|||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/definitions/Pet'
|
$ref: '#/definitions/Pet'
|
||||||
|
examples:
|
||||||
|
application/json:
|
||||||
|
name: Puma
|
||||||
|
type: Dog
|
||||||
|
color: Black
|
||||||
|
gender: Female
|
||||||
|
breed: Mixed
|
||||||
'400':
|
'400':
|
||||||
description: Invalid status value
|
description: Invalid status value
|
||||||
security:
|
security:
|
||||||
@ -126,20 +124,22 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- pet
|
- pet
|
||||||
summary: Finds Pets by tags
|
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
|
operationId: findPetsByTags
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- name: tags
|
- name: tags
|
||||||
in: query
|
in: query
|
||||||
description: Tags to filter by
|
description: Tags to filter by
|
||||||
required: true
|
required: false
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
collectionFormat: csv
|
collectionFormat: multi
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
@ -158,15 +158,17 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- pet
|
- pet
|
||||||
summary: Find pet by ID
|
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
|
operationId: getPetById
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- name: petId
|
- name: petId
|
||||||
in: path
|
in: path
|
||||||
description: ID of pet to return
|
description: ID of pet that needs to be fetched
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: integer
|
||||||
format: int64
|
format: int64
|
||||||
@ -181,6 +183,9 @@ paths:
|
|||||||
description: Pet not found
|
description: Pet not found
|
||||||
security:
|
security:
|
||||||
- api_key: []
|
- api_key: []
|
||||||
|
- petstore_auth:
|
||||||
|
- 'write:pets'
|
||||||
|
- 'read:pets'
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
- pet
|
- pet
|
||||||
@ -190,15 +195,14 @@ paths:
|
|||||||
consumes:
|
consumes:
|
||||||
- application/x-www-form-urlencoded
|
- application/x-www-form-urlencoded
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- name: petId
|
- name: petId
|
||||||
in: path
|
in: path
|
||||||
description: ID of pet that needs to be updated
|
description: ID of pet that needs to be updated
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: string
|
||||||
format: int64
|
|
||||||
- name: name
|
- name: name
|
||||||
in: formData
|
in: formData
|
||||||
description: Updated name of the pet
|
description: Updated name of the pet
|
||||||
@ -223,11 +227,12 @@ paths:
|
|||||||
description: ''
|
description: ''
|
||||||
operationId: deletePet
|
operationId: deletePet
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- name: api_key
|
- name: api_key
|
||||||
in: header
|
in: header
|
||||||
|
description: ''
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
- name: petId
|
- name: petId
|
||||||
@ -254,6 +259,7 @@ paths:
|
|||||||
- multipart/form-data
|
- multipart/form-data
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- name: petId
|
- name: petId
|
||||||
in: path
|
in: path
|
||||||
@ -272,10 +278,8 @@ paths:
|
|||||||
required: false
|
required: false
|
||||||
type: file
|
type: file
|
||||||
responses:
|
responses:
|
||||||
'200':
|
default:
|
||||||
description: successful operation
|
description: successful operation
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/ApiResponse'
|
|
||||||
security:
|
security:
|
||||||
- petstore_auth:
|
- petstore_auth:
|
||||||
- 'write:pets'
|
- 'write:pets'
|
||||||
@ -289,7 +293,7 @@ paths:
|
|||||||
operationId: getInventory
|
operationId: getInventory
|
||||||
produces:
|
produces:
|
||||||
- application/json
|
- application/json
|
||||||
parameters: []
|
- application/xml
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
@ -308,13 +312,13 @@ paths:
|
|||||||
description: ''
|
description: ''
|
||||||
operationId: placeOrder
|
operationId: placeOrder
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- in: body
|
- in: body
|
||||||
name: body
|
name: body
|
||||||
description: order placed for purchasing the pet
|
description: order placed for purchasing the pet
|
||||||
required: true
|
required: false
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/Order'
|
$ref: '#/definitions/Order'
|
||||||
responses:
|
responses:
|
||||||
@ -329,20 +333,19 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- store
|
- store
|
||||||
summary: Find purchase order by ID
|
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
|
operationId: getOrderById
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- name: orderId
|
- name: orderId
|
||||||
in: path
|
in: path
|
||||||
description: ID of pet that needs to be fetched
|
description: ID of pet that needs to be fetched
|
||||||
required: true
|
required: true
|
||||||
type: integer
|
type: string
|
||||||
maximum: 5
|
|
||||||
minimum: 1
|
|
||||||
format: int64
|
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
@ -356,11 +359,13 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- store
|
- store
|
||||||
summary: Delete purchase order by ID
|
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
|
operationId: deleteOrder
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- name: orderId
|
- name: orderId
|
||||||
in: path
|
in: path
|
||||||
@ -380,13 +385,13 @@ paths:
|
|||||||
description: This can only be done by the logged in user.
|
description: This can only be done by the logged in user.
|
||||||
operationId: createUser
|
operationId: createUser
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- in: body
|
- in: body
|
||||||
name: body
|
name: body
|
||||||
description: Created user object
|
description: Created user object
|
||||||
required: true
|
required: false
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/User'
|
$ref: '#/definitions/User'
|
||||||
responses:
|
responses:
|
||||||
@ -400,13 +405,13 @@ paths:
|
|||||||
description: ''
|
description: ''
|
||||||
operationId: createUsersWithArrayInput
|
operationId: createUsersWithArrayInput
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- in: body
|
- in: body
|
||||||
name: body
|
name: body
|
||||||
description: List of user object
|
description: List of user object
|
||||||
required: true
|
required: false
|
||||||
schema:
|
schema:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@ -422,13 +427,13 @@ paths:
|
|||||||
description: ''
|
description: ''
|
||||||
operationId: createUsersWithListInput
|
operationId: createUsersWithListInput
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- in: body
|
- in: body
|
||||||
name: body
|
name: body
|
||||||
description: List of user object
|
description: List of user object
|
||||||
required: true
|
required: false
|
||||||
schema:
|
schema:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@ -444,33 +449,24 @@ paths:
|
|||||||
description: ''
|
description: ''
|
||||||
operationId: loginUser
|
operationId: loginUser
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- name: username
|
- name: username
|
||||||
in: query
|
in: query
|
||||||
description: The user name for login
|
description: The user name for login
|
||||||
required: true
|
required: false
|
||||||
type: string
|
type: string
|
||||||
- name: password
|
- name: password
|
||||||
in: query
|
in: query
|
||||||
description: The password for login in clear text
|
description: The password for login in clear text
|
||||||
required: true
|
required: false
|
||||||
type: string
|
type: string
|
||||||
responses:
|
responses:
|
||||||
'200':
|
'200':
|
||||||
description: successful operation
|
description: successful operation
|
||||||
schema:
|
schema:
|
||||||
type: string
|
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':
|
'400':
|
||||||
description: Invalid username/password supplied
|
description: Invalid username/password supplied
|
||||||
/user/logout:
|
/user/logout:
|
||||||
@ -481,9 +477,8 @@ paths:
|
|||||||
description: ''
|
description: ''
|
||||||
operationId: logoutUser
|
operationId: logoutUser
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
parameters: []
|
- application/xml
|
||||||
responses:
|
responses:
|
||||||
default:
|
default:
|
||||||
description: successful operation
|
description: successful operation
|
||||||
@ -495,8 +490,8 @@ paths:
|
|||||||
description: ''
|
description: ''
|
||||||
operationId: getUserByName
|
operationId: getUserByName
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- name: username
|
- name: username
|
||||||
in: path
|
in: path
|
||||||
@ -519,8 +514,8 @@ paths:
|
|||||||
description: This can only be done by the logged in user.
|
description: This can only be done by the logged in user.
|
||||||
operationId: updateUser
|
operationId: updateUser
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- name: username
|
- name: username
|
||||||
in: path
|
in: path
|
||||||
@ -530,7 +525,7 @@ paths:
|
|||||||
- in: body
|
- in: body
|
||||||
name: body
|
name: body
|
||||||
description: Updated user object
|
description: Updated user object
|
||||||
required: true
|
required: false
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/User'
|
$ref: '#/definitions/User'
|
||||||
responses:
|
responses:
|
||||||
@ -545,8 +540,8 @@ paths:
|
|||||||
description: This can only be done by the logged in user.
|
description: This can only be done by the logged in user.
|
||||||
operationId: deleteUser
|
operationId: deleteUser
|
||||||
produces:
|
produces:
|
||||||
- application/xml
|
|
||||||
- application/json
|
- application/json
|
||||||
|
- application/xml
|
||||||
parameters:
|
parameters:
|
||||||
- name: username
|
- name: username
|
||||||
in: path
|
in: path
|
||||||
@ -559,6 +554,10 @@ paths:
|
|||||||
'404':
|
'404':
|
||||||
description: User not found
|
description: User not found
|
||||||
securityDefinitions:
|
securityDefinitions:
|
||||||
|
api_key:
|
||||||
|
type: apiKey
|
||||||
|
name: api_key
|
||||||
|
in: header
|
||||||
petstore_auth:
|
petstore_auth:
|
||||||
type: oauth2
|
type: oauth2
|
||||||
authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
|
authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
|
||||||
@ -566,56 +565,8 @@ securityDefinitions:
|
|||||||
scopes:
|
scopes:
|
||||||
'write:pets': modify pets in your account
|
'write:pets': modify pets in your account
|
||||||
'read:pets': read your pets
|
'read:pets': read your pets
|
||||||
api_key:
|
|
||||||
type: apiKey
|
|
||||||
name: api_key
|
|
||||||
in: header
|
|
||||||
definitions:
|
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:
|
User:
|
||||||
title: a User
|
|
||||||
description: A User who is purchasing from the pet store
|
|
||||||
type: object
|
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
@ -638,10 +589,7 @@ definitions:
|
|||||||
description: User Status
|
description: User Status
|
||||||
xml:
|
xml:
|
||||||
name: User
|
name: User
|
||||||
Tag:
|
Category:
|
||||||
title: Pet Tag
|
|
||||||
description: A tag for a pet
|
|
||||||
type: object
|
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
@ -649,11 +597,8 @@ definitions:
|
|||||||
name:
|
name:
|
||||||
type: string
|
type: string
|
||||||
xml:
|
xml:
|
||||||
name: Tag
|
name: Category
|
||||||
Pet:
|
Pet:
|
||||||
title: a Pet
|
|
||||||
description: A pet for sale in the pet store
|
|
||||||
type: object
|
|
||||||
required:
|
required:
|
||||||
- name
|
- name
|
||||||
- photoUrls
|
- photoUrls
|
||||||
@ -689,18 +634,37 @@ definitions:
|
|||||||
- sold
|
- sold
|
||||||
xml:
|
xml:
|
||||||
name: Pet
|
name: Pet
|
||||||
ApiResponse:
|
Tag:
|
||||||
title: An uploaded response
|
|
||||||
description: Describes the result of uploading an image resource
|
|
||||||
type: object
|
|
||||||
properties:
|
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
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
type:
|
shipDate:
|
||||||
type: string
|
type: string
|
||||||
message:
|
format: date-time
|
||||||
|
status:
|
||||||
type: string
|
type: string
|
||||||
externalDocs:
|
description: Order Status
|
||||||
description: Find out more about Swagger
|
enum:
|
||||||
url: 'http://swagger.io'
|
- 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/jaxrs-cxf-client</module>
|
||||||
<module>samples/client/petstore/java/resttemplate</module>
|
<module>samples/client/petstore/java/resttemplate</module>
|
||||||
<module>samples/client/petstore/scala</module>
|
<module>samples/client/petstore/scala</module>
|
||||||
<!-- only test java-related projects
|
|
||||||
<module>samples/client/petstore/akka-scala</module>
|
<module>samples/client/petstore/akka-scala</module>
|
||||||
<module>samples/client/petstore/ruby</module>
|
<module>samples/client/petstore/ruby</module>
|
||||||
<module>samples/client/petstore/android/volley</module>
|
<module>samples/client/petstore/android/volley</module>
|
||||||
@ -818,7 +817,6 @@
|
|||||||
<module>samples/client/petstore/typescript-angular</module>
|
<module>samples/client/petstore/typescript-angular</module>
|
||||||
<module>samples/client/petstore/typescript-node/npm</module>
|
<module>samples/client/petstore/typescript-node/npm</module>
|
||||||
<module>samples/client/petstore/typescript-jquery/npm</module>
|
<module>samples/client/petstore/typescript-jquery/npm</module>
|
||||||
-->
|
|
||||||
<!--module>samples/client/petstore/objc/SwaggerClientTests</module-->
|
<!--module>samples/client/petstore/objc/SwaggerClientTests</module-->
|
||||||
<!--module>samples/client/petstore/swift/SwaggerClientTests</module-->
|
<!--module>samples/client/petstore/swift/SwaggerClientTests</module-->
|
||||||
<!-- servers -->
|
<!-- servers -->
|
||||||
@ -833,15 +831,13 @@
|
|||||||
<module>samples/server/petstore/jaxrs-resteasy/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>
|
<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</module>
|
||||||
<module>samples/server/petstore/springboot-beanvalidation</module>
|
<module>samples/server/petstore/springboot-beanvalidation</module>
|
||||||
<module>samples/server/petstore/jaxrs-cxf</module>
|
<module>samples/server/petstore/jaxrs-cxf</module>
|
||||||
<module>samples/server/petstore/jaxrs-cxf-annotated-base-path</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-cdi</module>
|
||||||
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
|
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
|
||||||
|
|
||||||
<!--<module>samples/server/petstore/java-msf4j</module> note: JDK8 only -->
|
<!--<module>samples/server/petstore/java-msf4j</module> note: JDK8 only -->
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
|
@ -802,8 +802,8 @@
|
|||||||
<module>samples/client/petstore/java/retrofit2rx</module>
|
<module>samples/client/petstore/java/retrofit2rx</module>
|
||||||
<module>samples/client/petstore/jaxrs-cxf-client</module>
|
<module>samples/client/petstore/jaxrs-cxf-client</module>
|
||||||
<module>samples/client/petstore/java/resttemplate</module>
|
<module>samples/client/petstore/java/resttemplate</module>
|
||||||
<module>samples/client/petstore/scala</module>
|
|
||||||
<!-- only test java-related projects
|
<!-- only test java-related projects
|
||||||
|
<module>samples/client/petstore/scala</module>
|
||||||
<module>samples/client/petstore/akka-scala</module>
|
<module>samples/client/petstore/akka-scala</module>
|
||||||
<module>samples/client/petstore/ruby</module>
|
<module>samples/client/petstore/ruby</module>
|
||||||
<module>samples/client/petstore/android/volley</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</module>
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/eap-joda</module>
|
<module>samples/server/petstore/jaxrs-resteasy/eap-joda</module>
|
||||||
<module>samples/server/petstore/jaxrs-resteasy/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>
|
<module>samples/server/petstore/spring-mvc</module>
|
||||||
<!-- comment out due to change in method signature
|
<!-- comment out due to change in method signature
|
||||||
<module>samples/client/petstore/spring-cloud</module> -->
|
<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-annotated-base-path</module>
|
||||||
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
|
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
|
||||||
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
|
<module>samples/server/petstore/jaxrs-cxf-non-spring-app</module>
|
||||||
|
|
||||||
<!--<module>samples/server/petstore/java-msf4j</module> note: JDK8 only -->
|
<!--<module>samples/server/petstore/java-msf4j</module> note: JDK8 only -->
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
|
@ -106,6 +106,7 @@ Class | Method | HTTP request | Description
|
|||||||
|
|
||||||
## Documentation for Models
|
## Documentation for Models
|
||||||
|
|
||||||
|
- [ApiResponse](docs/ApiResponse.md)
|
||||||
- [Category](docs/Category.md)
|
- [Category](docs/Category.md)
|
||||||
- [Order](docs/Order.md)
|
- [Order](docs/Order.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
@ -138,5 +139,5 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea
|
|||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
|
||||||
apiteam@wordnik.com
|
apiteam@swagger.io
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.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'
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 25
|
||||||
buildToolsVersion '23.0.2'
|
buildToolsVersion '25.0.2'
|
||||||
useLibrary 'org.apache.http.legacy'
|
useLibrary 'org.apache.http.legacy'
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 23
|
targetSdkVersion 25
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
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
|
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
|
### Return type
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ null (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
- **Content-Type**: application/json, application/xml
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="deletePet"></a>
|
<a name="deletePet"></a>
|
||||||
# **deletePet**
|
# **deletePet**
|
||||||
@ -98,7 +98,7 @@ null (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="findPetsByStatus"></a>
|
<a name="findPetsByStatus"></a>
|
||||||
# **findPetsByStatus**
|
# **findPetsByStatus**
|
||||||
@ -114,7 +114,7 @@ Multiple status values can be provided with comma separated strings
|
|||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new 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 {
|
try {
|
||||||
List<Pet> result = apiInstance.findPetsByStatus(status);
|
List<Pet> result = apiInstance.findPetsByStatus(status);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
@ -128,7 +128,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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
|
### Return type
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ Name | Type | Description | Notes
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="findPetsByTags"></a>
|
<a name="findPetsByTags"></a>
|
||||||
# **findPetsByTags**
|
# **findPetsByTags**
|
||||||
@ -171,7 +171,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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
|
### Return type
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ Name | Type | Description | Notes
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="getPetById"></a>
|
<a name="getPetById"></a>
|
||||||
# **getPetById**
|
# **getPetById**
|
||||||
@ -192,7 +192,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
Find pet by ID
|
Find pet by ID
|
||||||
|
|
||||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
Returns a single pet
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```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;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new 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 {
|
try {
|
||||||
Pet result = apiInstance.getPetById(petId);
|
Pet result = apiInstance.getPetById(petId);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
@ -214,7 +214,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**petId** | **Long**| ID of pet that needs to be fetched |
|
**petId** | **Long**| ID of pet to return |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -222,12 +222,12 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
|
[api_key](../README.md#api_key)
|
||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="updatePet"></a>
|
<a name="updatePet"></a>
|
||||||
# **updatePet**
|
# **updatePet**
|
||||||
@ -256,7 +256,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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
|
### Return type
|
||||||
|
|
||||||
@ -269,7 +269,7 @@ null (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
- **Content-Type**: application/json, application/xml
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="updatePetWithForm"></a>
|
<a name="updatePetWithForm"></a>
|
||||||
# **updatePetWithForm**
|
# **updatePetWithForm**
|
||||||
@ -285,7 +285,7 @@ Updates a pet in the store with form data
|
|||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new 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 name = "name_example"; // String | Updated name of the pet
|
||||||
String status = "status_example"; // String | Updated status of the pet
|
String status = "status_example"; // String | Updated status of the pet
|
||||||
try {
|
try {
|
||||||
@ -300,7 +300,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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]
|
**name** | **String**| Updated name of the pet | [optional]
|
||||||
**status** | **String**| Updated status of the pet | [optional]
|
**status** | **String**| Updated status of the pet | [optional]
|
||||||
|
|
||||||
@ -315,11 +315,11 @@ null (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="uploadFile"></a>
|
<a name="uploadFile"></a>
|
||||||
# **uploadFile**
|
# **uploadFile**
|
||||||
> uploadFile(petId, additionalMetadata, file)
|
> ApiResponse uploadFile(petId, additionalMetadata, file)
|
||||||
|
|
||||||
uploads an image
|
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
|
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
||||||
File file = new File("/path/to/file.txt"); // File | file to upload
|
File file = new File("/path/to/file.txt"); // File | file to upload
|
||||||
try {
|
try {
|
||||||
apiInstance.uploadFile(petId, additionalMetadata, file);
|
ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
|
||||||
|
System.out.println(result);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling PetApi#uploadFile");
|
System.err.println("Exception when calling PetApi#uploadFile");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -352,7 +353,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
null (empty response body)
|
[**ApiResponse**](ApiResponse.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
@ -361,5 +362,5 @@ null (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: multipart/form-data
|
- **Content-Type**: multipart/form-data
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="getInventory"></a>
|
<a name="getInventory"></a>
|
||||||
# **getInventory**
|
# **getInventory**
|
||||||
@ -89,7 +89,7 @@ This endpoint does not need any parameter.
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/json
|
||||||
|
|
||||||
<a name="getOrderById"></a>
|
<a name="getOrderById"></a>
|
||||||
# **getOrderById**
|
# **getOrderById**
|
||||||
@ -105,7 +105,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
|
|||||||
//import io.swagger.client.api.StoreApi;
|
//import io.swagger.client.api.StoreApi;
|
||||||
|
|
||||||
StoreApi apiInstance = new 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 {
|
try {
|
||||||
Order result = apiInstance.getOrderById(orderId);
|
Order result = apiInstance.getOrderById(orderId);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
@ -119,7 +119,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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
|
### Return type
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="placeOrder"></a>
|
<a name="placeOrder"></a>
|
||||||
# **placeOrder**
|
# **placeOrder**
|
||||||
@ -162,7 +162,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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
|
### Return type
|
||||||
|
|
||||||
@ -175,5 +175,5 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**User**](User.md)| Created user object | [optional]
|
**body** | [**User**](User.md)| Created user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="createUsersWithArrayInput"></a>
|
<a name="createUsersWithArrayInput"></a>
|
||||||
# **createUsersWithArrayInput**
|
# **createUsersWithArrayInput**
|
||||||
@ -83,7 +83,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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
|
### Return type
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="createUsersWithListInput"></a>
|
<a name="createUsersWithListInput"></a>
|
||||||
# **createUsersWithListInput**
|
# **createUsersWithListInput**
|
||||||
@ -125,7 +125,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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
|
### Return type
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="deleteUser"></a>
|
<a name="deleteUser"></a>
|
||||||
# **deleteUser**
|
# **deleteUser**
|
||||||
@ -180,7 +180,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="getUserByName"></a>
|
<a name="getUserByName"></a>
|
||||||
# **getUserByName**
|
# **getUserByName**
|
||||||
@ -223,7 +223,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="loginUser"></a>
|
<a name="loginUser"></a>
|
||||||
# **loginUser**
|
# **loginUser**
|
||||||
@ -254,8 +254,8 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **String**| The user name for login | [optional]
|
**username** | **String**| The user name for login |
|
||||||
**password** | **String**| The password for login in clear text | [optional]
|
**password** | **String**| The password for login in clear text |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -268,7 +268,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="logoutUser"></a>
|
<a name="logoutUser"></a>
|
||||||
# **logoutUser**
|
# **logoutUser**
|
||||||
@ -306,7 +306,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="updateUser"></a>
|
<a name="updateUser"></a>
|
||||||
# **updateUser**
|
# **updateUser**
|
||||||
@ -337,7 +337,7 @@ try {
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **String**| name that need to be deleted |
|
**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
|
### Return type
|
||||||
|
|
||||||
@ -350,5 +350,5 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -35,6 +35,10 @@ public class JsonUtil {
|
|||||||
public static Type getListTypeForDeserialization(Class cls) {
|
public static Type getListTypeForDeserialization(Class cls) {
|
||||||
String className = cls.getSimpleName();
|
String className = cls.getSimpleName();
|
||||||
|
|
||||||
|
if ("ApiResponse".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<List<ApiResponse>>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
if ("Category".equalsIgnoreCase(className)) {
|
if ("Category".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken<List<Category>>(){}.getType();
|
return new TypeToken<List<Category>>(){}.getType();
|
||||||
}
|
}
|
||||||
@ -61,6 +65,10 @@ public class JsonUtil {
|
|||||||
public static Type getTypeForDeserialization(Class cls) {
|
public static Type getTypeForDeserialization(Class cls) {
|
||||||
String className = cls.getSimpleName();
|
String className = cls.getSimpleName();
|
||||||
|
|
||||||
|
if ("ApiResponse".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<ApiResponse>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
if ("Category".equalsIgnoreCase(className)) {
|
if ("Category".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken<Category>(){}.getType();
|
return new TypeToken<Category>(){}.getType();
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -20,6 +20,7 @@ import io.swagger.client.model.*;
|
|||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import io.swagger.client.model.ApiResponse;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import io.swagger.client.model.Pet;
|
import io.swagger.client.model.Pet;
|
||||||
|
|
||||||
@ -57,7 +58,10 @@ public class PetApi {
|
|||||||
*/
|
*/
|
||||||
public void addPet (Pet body) throws ApiException {
|
public void addPet (Pet body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
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
|
// create path and map variables
|
||||||
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
|
||||||
@ -107,12 +111,10 @@ public class PetApi {
|
|||||||
*/
|
*/
|
||||||
public void deletePet (Long petId, String apiKey) throws ApiException {
|
public void deletePet (Long petId, String apiKey) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
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 {
|
public List<Pet> findPetsByStatus (List<String> status) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
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
|
// create path and map variables
|
||||||
String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
||||||
@ -174,7 +179,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> localVarFormParams = new HashMap<String, String>();
|
Map<String, String> localVarFormParams = new HashMap<String, String>();
|
||||||
|
|
||||||
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("multi", "status", status));
|
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("csv", "status", status));
|
||||||
|
|
||||||
|
|
||||||
String[] localVarContentTypes = {
|
String[] localVarContentTypes = {
|
||||||
@ -212,7 +217,10 @@ public class PetApi {
|
|||||||
*/
|
*/
|
||||||
public List<Pet> findPetsByTags (List<String> tags) throws ApiException {
|
public List<Pet> findPetsByTags (List<String> tags) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
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
|
// create path and map variables
|
||||||
String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
||||||
@ -224,7 +232,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> localVarFormParams = new HashMap<String, String>();
|
Map<String, String> localVarFormParams = new HashMap<String, String>();
|
||||||
|
|
||||||
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("multi", "tags", tags));
|
localVarQueryParams.addAll(ApiInvoker.parameterToPairs("csv", "tags", tags));
|
||||||
|
|
||||||
|
|
||||||
String[] localVarContentTypes = {
|
String[] localVarContentTypes = {
|
||||||
@ -256,18 +264,16 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Find pet by ID
|
* Find pet by ID
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a single pet
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet to return
|
||||||
* @return Pet
|
* @return Pet
|
||||||
*/
|
*/
|
||||||
public Pet getPetById (Long petId) throws ApiException {
|
public Pet getPetById (Long petId) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
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 {
|
public void updatePet (Pet body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
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
|
// create path and map variables
|
||||||
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
|
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
|
||||||
@ -365,14 +374,12 @@ public class PetApi {
|
|||||||
* @param status Updated status of the pet
|
* @param status Updated status of the pet
|
||||||
* @return void
|
* @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;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
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 petId ID of pet to update
|
||||||
* @param additionalMetadata Additional data to pass to server
|
* @param additionalMetadata Additional data to pass to server
|
||||||
* @param file file to upload
|
* @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;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String localVarPath = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
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 {
|
try {
|
||||||
String localVarResponse = apiInvoker.invokeAPI(basePath, localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarContentType);
|
String localVarResponse = apiInvoker.invokeAPI(basePath, localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarContentType);
|
||||||
if(localVarResponse != null){
|
if(localVarResponse != null){
|
||||||
return ;
|
return (ApiResponse) ApiInvoker.deserialize(localVarResponse, "", ApiResponse.class);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return ;
|
return null;
|
||||||
}
|
}
|
||||||
} catch (ApiException ex) {
|
} catch (ApiException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -57,12 +57,10 @@ public class StoreApi {
|
|||||||
*/
|
*/
|
||||||
public void deleteOrder (String orderId) throws ApiException {
|
public void deleteOrder (String orderId) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
// verify the required parameter 'orderId' is set
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder");
|
throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
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 {
|
public Map<String, Integer> getInventory () throws ApiException {
|
||||||
Object localVarPostBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String localVarPath = "/store/inventory".replaceAll("\\{format\\}","json");
|
String localVarPath = "/store/inventory".replaceAll("\\{format\\}","json");
|
||||||
@ -157,14 +154,12 @@ public class StoreApi {
|
|||||||
* @param orderId ID of pet that needs to be fetched
|
* @param orderId ID of pet that needs to be fetched
|
||||||
* @return Order
|
* @return Order
|
||||||
*/
|
*/
|
||||||
public Order getOrderById (String orderId) throws ApiException {
|
public Order getOrderById (Long orderId) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
// verify the required parameter 'orderId' is set
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById");
|
throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
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 {
|
public Order placeOrder (Order body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
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
|
// create path and map variables
|
||||||
String localVarPath = "/store/order".replaceAll("\\{format\\}","json");
|
String localVarPath = "/store/order".replaceAll("\\{format\\}","json");
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -57,7 +57,10 @@ public class UserApi {
|
|||||||
*/
|
*/
|
||||||
public void createUser (User body) throws ApiException {
|
public void createUser (User body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
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
|
// create path and map variables
|
||||||
String localVarPath = "/user".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user".replaceAll("\\{format\\}","json");
|
||||||
@ -106,7 +109,10 @@ public class UserApi {
|
|||||||
*/
|
*/
|
||||||
public void createUsersWithArrayInput (List<User> body) throws ApiException {
|
public void createUsersWithArrayInput (List<User> body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
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
|
// create path and map variables
|
||||||
String localVarPath = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
||||||
@ -155,7 +161,10 @@ public class UserApi {
|
|||||||
*/
|
*/
|
||||||
public void createUsersWithListInput (List<User> body) throws ApiException {
|
public void createUsersWithListInput (List<User> body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
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
|
// create path and map variables
|
||||||
String localVarPath = "/user/createWithList".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/createWithList".replaceAll("\\{format\\}","json");
|
||||||
@ -204,12 +213,10 @@ public class UserApi {
|
|||||||
*/
|
*/
|
||||||
public void deleteUser (String username) throws ApiException {
|
public void deleteUser (String username) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
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 {
|
public User getUserByName (String username) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
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 {
|
public String loginUser (String username, String password) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
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
|
// create path and map variables
|
||||||
String localVarPath = "/user/login".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/login".replaceAll("\\{format\\}","json");
|
||||||
@ -363,7 +375,6 @@ public class UserApi {
|
|||||||
*/
|
*/
|
||||||
public void logoutUser () throws ApiException {
|
public void logoutUser () throws ApiException {
|
||||||
Object localVarPostBody = null;
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String localVarPath = "/user/logout".replaceAll("\\{format\\}","json");
|
String localVarPath = "/user/logout".replaceAll("\\{format\\}","json");
|
||||||
@ -413,12 +424,14 @@ public class UserApi {
|
|||||||
*/
|
*/
|
||||||
public void updateUser (String username, User body) throws ApiException {
|
public void updateUser (String username, User body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
Object localVarPostBody = body;
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
|
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
|
// create path and map variables
|
||||||
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
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;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
/**
|
||||||
|
* A category for a pet
|
||||||
|
**/
|
||||||
|
@ApiModel(description = "A category for a pet")
|
||||||
public class Category {
|
public class Category {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
|
@ -6,7 +6,10 @@ import io.swagger.annotations.*;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
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 {
|
public class Order {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
|
@ -8,7 +8,10 @@ import io.swagger.annotations.*;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
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 {
|
public class Pet {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
|
@ -5,7 +5,10 @@ import io.swagger.annotations.*;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
|
||||||
@ApiModel(description = "")
|
/**
|
||||||
|
* A tag for a pet
|
||||||
|
**/
|
||||||
|
@ApiModel(description = "A tag for a pet")
|
||||||
public class Tag {
|
public class Tag {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
|
@ -5,7 +5,10 @@ import io.swagger.annotations.*;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
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 {
|
public class User {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
|
@ -106,6 +106,7 @@ Class | Method | HTTP request | Description
|
|||||||
|
|
||||||
## Documentation for Models
|
## Documentation for Models
|
||||||
|
|
||||||
|
- [ApiResponse](docs/ApiResponse.md)
|
||||||
- [Category](docs/Category.md)
|
- [Category](docs/Category.md)
|
||||||
- [Order](docs/Order.md)
|
- [Order](docs/Order.md)
|
||||||
- [Pet](docs/Pet.md)
|
- [Pet](docs/Pet.md)
|
||||||
@ -138,5 +139,5 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea
|
|||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
|
||||||
apiteam@wordnik.com
|
apiteam@swagger.io
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
classpath 'com.android.tools.build:gradle:2.3.+'
|
||||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.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'
|
apply plugin: 'com.github.dcendents.android-maven'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 23
|
compileSdkVersion 25
|
||||||
buildToolsVersion '23.0.2'
|
buildToolsVersion '25.0.2'
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 14
|
minSdkVersion 14
|
||||||
targetSdkVersion 23
|
targetSdkVersion 25
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_7
|
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
|
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
|
### Return type
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ null (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
- **Content-Type**: application/json, application/xml
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="deletePet"></a>
|
<a name="deletePet"></a>
|
||||||
# **deletePet**
|
# **deletePet**
|
||||||
@ -98,7 +98,7 @@ null (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="findPetsByStatus"></a>
|
<a name="findPetsByStatus"></a>
|
||||||
# **findPetsByStatus**
|
# **findPetsByStatus**
|
||||||
@ -114,7 +114,7 @@ Multiple status values can be provided with comma separated strings
|
|||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new 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 {
|
try {
|
||||||
List<Pet> result = apiInstance.findPetsByStatus(status);
|
List<Pet> result = apiInstance.findPetsByStatus(status);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
@ -128,7 +128,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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
|
### Return type
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ Name | Type | Description | Notes
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="findPetsByTags"></a>
|
<a name="findPetsByTags"></a>
|
||||||
# **findPetsByTags**
|
# **findPetsByTags**
|
||||||
@ -171,7 +171,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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
|
### Return type
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ Name | Type | Description | Notes
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="getPetById"></a>
|
<a name="getPetById"></a>
|
||||||
# **getPetById**
|
# **getPetById**
|
||||||
@ -192,7 +192,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
Find pet by ID
|
Find pet by ID
|
||||||
|
|
||||||
Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
Returns a single pet
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```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;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new 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 {
|
try {
|
||||||
Pet result = apiInstance.getPetById(petId);
|
Pet result = apiInstance.getPetById(petId);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
@ -214,7 +214,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**petId** | **Long**| ID of pet that needs to be fetched |
|
**petId** | **Long**| ID of pet to return |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -222,12 +222,12 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
|
[api_key](../README.md#api_key)
|
||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="updatePet"></a>
|
<a name="updatePet"></a>
|
||||||
# **updatePet**
|
# **updatePet**
|
||||||
@ -256,7 +256,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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
|
### Return type
|
||||||
|
|
||||||
@ -269,7 +269,7 @@ null (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
- **Content-Type**: application/json, application/xml
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="updatePetWithForm"></a>
|
<a name="updatePetWithForm"></a>
|
||||||
# **updatePetWithForm**
|
# **updatePetWithForm**
|
||||||
@ -285,7 +285,7 @@ Updates a pet in the store with form data
|
|||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new 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 name = "name_example"; // String | Updated name of the pet
|
||||||
String status = "status_example"; // String | Updated status of the pet
|
String status = "status_example"; // String | Updated status of the pet
|
||||||
try {
|
try {
|
||||||
@ -300,7 +300,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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]
|
**name** | **String**| Updated name of the pet | [optional]
|
||||||
**status** | **String**| Updated status of the pet | [optional]
|
**status** | **String**| Updated status of the pet | [optional]
|
||||||
|
|
||||||
@ -315,11 +315,11 @@ null (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="uploadFile"></a>
|
<a name="uploadFile"></a>
|
||||||
# **uploadFile**
|
# **uploadFile**
|
||||||
> uploadFile(petId, additionalMetadata, file)
|
> ApiResponse uploadFile(petId, additionalMetadata, file)
|
||||||
|
|
||||||
uploads an image
|
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
|
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
||||||
File file = new File("/path/to/file.txt"); // File | file to upload
|
File file = new File("/path/to/file.txt"); // File | file to upload
|
||||||
try {
|
try {
|
||||||
apiInstance.uploadFile(petId, additionalMetadata, file);
|
ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
|
||||||
|
System.out.println(result);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling PetApi#uploadFile");
|
System.err.println("Exception when calling PetApi#uploadFile");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -352,7 +353,7 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
null (empty response body)
|
[**ApiResponse**](ApiResponse.md)
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
@ -361,5 +362,5 @@ null (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: multipart/form-data
|
- **Content-Type**: multipart/form-data
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/json
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="getInventory"></a>
|
<a name="getInventory"></a>
|
||||||
# **getInventory**
|
# **getInventory**
|
||||||
@ -89,7 +89,7 @@ This endpoint does not need any parameter.
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/json
|
||||||
|
|
||||||
<a name="getOrderById"></a>
|
<a name="getOrderById"></a>
|
||||||
# **getOrderById**
|
# **getOrderById**
|
||||||
@ -105,7 +105,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
|
|||||||
//import io.swagger.client.api.StoreApi;
|
//import io.swagger.client.api.StoreApi;
|
||||||
|
|
||||||
StoreApi apiInstance = new 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 {
|
try {
|
||||||
Order result = apiInstance.getOrderById(orderId);
|
Order result = apiInstance.getOrderById(orderId);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
@ -119,7 +119,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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
|
### Return type
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="placeOrder"></a>
|
<a name="placeOrder"></a>
|
||||||
# **placeOrder**
|
# **placeOrder**
|
||||||
@ -162,7 +162,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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
|
### Return type
|
||||||
|
|
||||||
@ -175,5 +175,5 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**User**](User.md)| Created user object | [optional]
|
**body** | [**User**](User.md)| Created user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="createUsersWithArrayInput"></a>
|
<a name="createUsersWithArrayInput"></a>
|
||||||
# **createUsersWithArrayInput**
|
# **createUsersWithArrayInput**
|
||||||
@ -83,7 +83,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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
|
### Return type
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="createUsersWithListInput"></a>
|
<a name="createUsersWithListInput"></a>
|
||||||
# **createUsersWithListInput**
|
# **createUsersWithListInput**
|
||||||
@ -125,7 +125,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
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
|
### Return type
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="deleteUser"></a>
|
<a name="deleteUser"></a>
|
||||||
# **deleteUser**
|
# **deleteUser**
|
||||||
@ -180,7 +180,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="getUserByName"></a>
|
<a name="getUserByName"></a>
|
||||||
# **getUserByName**
|
# **getUserByName**
|
||||||
@ -223,7 +223,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="loginUser"></a>
|
<a name="loginUser"></a>
|
||||||
# **loginUser**
|
# **loginUser**
|
||||||
@ -254,8 +254,8 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **String**| The user name for login | [optional]
|
**username** | **String**| The user name for login |
|
||||||
**password** | **String**| The password for login in clear text | [optional]
|
**password** | **String**| The password for login in clear text |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -268,7 +268,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="logoutUser"></a>
|
<a name="logoutUser"></a>
|
||||||
# **logoutUser**
|
# **logoutUser**
|
||||||
@ -306,7 +306,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
<a name="updateUser"></a>
|
<a name="updateUser"></a>
|
||||||
# **updateUser**
|
# **updateUser**
|
||||||
@ -337,7 +337,7 @@ try {
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **String**| name that need to be deleted |
|
**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
|
### Return type
|
||||||
|
|
||||||
@ -350,5 +350,5 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/json, application/xml
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -57,6 +57,10 @@ public class JsonUtil {
|
|||||||
public static Type getListTypeForDeserialization(Class cls) {
|
public static Type getListTypeForDeserialization(Class cls) {
|
||||||
String className = cls.getSimpleName();
|
String className = cls.getSimpleName();
|
||||||
|
|
||||||
|
if ("ApiResponse".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<List<ApiResponse>>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
if ("Category".equalsIgnoreCase(className)) {
|
if ("Category".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken<List<Category>>(){}.getType();
|
return new TypeToken<List<Category>>(){}.getType();
|
||||||
}
|
}
|
||||||
@ -83,6 +87,10 @@ public class JsonUtil {
|
|||||||
public static Type getTypeForDeserialization(Class cls) {
|
public static Type getTypeForDeserialization(Class cls) {
|
||||||
String className = cls.getSimpleName();
|
String className = cls.getSimpleName();
|
||||||
|
|
||||||
|
if ("ApiResponse".equalsIgnoreCase(className)) {
|
||||||
|
return new TypeToken<ApiResponse>(){}.getType();
|
||||||
|
}
|
||||||
|
|
||||||
if ("Category".equalsIgnoreCase(className)) {
|
if ("Category".equalsIgnoreCase(className)) {
|
||||||
return new TypeToken<Category>(){}.getType();
|
return new TypeToken<Category>(){}.getType();
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -23,6 +23,7 @@ import java.util.*;
|
|||||||
import com.android.volley.Response;
|
import com.android.volley.Response;
|
||||||
import com.android.volley.VolleyError;
|
import com.android.volley.VolleyError;
|
||||||
|
|
||||||
|
import io.swagger.client.model.ApiResponse;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import io.swagger.client.model.Pet;
|
import io.swagger.client.model.Pet;
|
||||||
|
|
||||||
@ -64,6 +65,11 @@ public class PetApi {
|
|||||||
*/
|
*/
|
||||||
public void addPet (Pet body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
public void addPet (Pet body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = body;
|
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
|
// create path and map variables
|
||||||
String path = "/pet";
|
String path = "/pet";
|
||||||
@ -103,15 +109,15 @@ public class PetApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void addPet (Pet body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = body;
|
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
|
// create path and map variables
|
||||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
String path = "/pet".replaceAll("\\{format\\}","json");
|
||||||
@ -153,7 +163,7 @@ public class PetApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||||
@ -224,15 +234,15 @@ public class PetApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void deletePet (Long petId, String apiKey, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
VolleyError error = new VolleyError("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"));
|
new ApiException(400, "Missing the required parameter 'petId' when calling deletePet"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||||
@ -281,7 +289,7 @@ public class PetApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
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 {
|
public List<Pet> findPetsByStatus (List<String> status) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = null;
|
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
|
// create path and map variables
|
||||||
String path = "/pet/findByStatus";
|
String path = "/pet/findByStatus";
|
||||||
@ -318,7 +331,7 @@ public class PetApi {
|
|||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
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[] contentTypes = {
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
@ -346,15 +359,15 @@ public class PetApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void findPetsByStatus (List<String> status, final Response.Listener<List<Pet>> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = null;
|
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
|
// create path and map variables
|
||||||
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
String path = "/pet/findByStatus".replaceAll("\\{format\\}","json");
|
||||||
@ -378,7 +395,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
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[] contentTypes = {
|
||||||
@ -397,7 +414,7 @@ public class PetApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
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 {
|
public List<Pet> findPetsByTags (List<String> tags) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = null;
|
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
|
// create path and map variables
|
||||||
String path = "/pet/findByTags";
|
String path = "/pet/findByTags";
|
||||||
@ -438,7 +460,7 @@ public class PetApi {
|
|||||||
Map<String, String> headerParams = new HashMap<String, String>();
|
Map<String, String> headerParams = new HashMap<String, String>();
|
||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
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[] contentTypes = {
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
@ -466,15 +488,15 @@ public class PetApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void findPetsByTags (List<String> tags, final Response.Listener<List<Pet>> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = null;
|
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
|
// create path and map variables
|
||||||
String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
String path = "/pet/findByTags".replaceAll("\\{format\\}","json");
|
||||||
@ -498,7 +524,7 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
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[] contentTypes = {
|
||||||
@ -517,7 +543,7 @@ public class PetApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||||
@ -542,8 +568,8 @@ public class PetApi {
|
|||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Find pet by ID
|
* Find pet by ID
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a single pet
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet to return
|
||||||
* @return Pet
|
* @return Pet
|
||||||
*/
|
*/
|
||||||
public Pet getPetById (Long petId) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
public Pet getPetById (Long petId) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
@ -576,7 +602,7 @@ public class PetApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
String[] authNames = new String[] { "api_key" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
||||||
@ -590,33 +616,31 @@ public class PetApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException ex) {
|
} catch (TimeoutException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find pet by ID
|
* Find pet by ID
|
||||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
* Returns a single pet
|
||||||
* @param petId ID of pet that needs to be fetched
|
* @param petId ID of pet to return
|
||||||
*/
|
*/
|
||||||
public void getPetById (Long petId, final Response.Listener<Pet> responseListener, final Response.ErrorListener errorListener) {
|
public void getPetById (Long petId, final Response.Listener<Pet> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
VolleyError error = new VolleyError("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"));
|
new ApiException(400, "Missing the required parameter 'petId' when calling getPetById"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||||
@ -646,7 +670,7 @@ public class PetApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
String[] authNames = new String[] { "api_key" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
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 {
|
public void updatePet (Pet body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = body;
|
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
|
// create path and map variables
|
||||||
String path = "/pet";
|
String path = "/pet";
|
||||||
@ -716,15 +745,15 @@ public class PetApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void updatePet (Pet body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = body;
|
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
|
// create path and map variables
|
||||||
String path = "/pet".replaceAll("\\{format\\}","json");
|
String path = "/pet".replaceAll("\\{format\\}","json");
|
||||||
@ -766,7 +799,7 @@ public class PetApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
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
|
* @param status Updated status of the pet
|
||||||
* @return void
|
* @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;
|
Object postBody = null;
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -846,15 +879,15 @@ public class PetApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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
|
* @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;
|
Object postBody = null;
|
||||||
|
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
VolleyError error = new VolleyError("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"));
|
new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
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));
|
formParams.put("status", ApiInvoker.parameterToString(status));
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "petstore_auth" };
|
String[] authNames = new String[] { "petstore_auth" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
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 petId ID of pet to update
|
||||||
* @param additionalMetadata Additional data to pass to server
|
* @param additionalMetadata Additional data to pass to server
|
||||||
* @param file file to upload
|
* @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;
|
Object postBody = null;
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
@ -982,24 +1013,24 @@ formParams.put("status", ApiInvoker.parameterToString(status));
|
|||||||
try {
|
try {
|
||||||
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
||||||
if (localVarResponse != null) {
|
if (localVarResponse != null) {
|
||||||
return ;
|
return (ApiResponse) ApiInvoker.deserialize(localVarResponse, "", ApiResponse.class);
|
||||||
} else {
|
} else {
|
||||||
return ;
|
return null;
|
||||||
}
|
}
|
||||||
} catch (ApiException ex) {
|
} catch (ApiException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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
|
* @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;
|
Object postBody = null;
|
||||||
|
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
// verify the required parameter 'petId' is set
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
VolleyError error = new VolleyError("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"));
|
new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
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 {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||||
new Response.Listener<String>() {
|
new Response.Listener<String>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(String localVarResponse) {
|
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() {
|
}, new Response.ErrorListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -106,15 +106,15 @@ public class StoreApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void deleteOrder (String orderId, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
// verify the required parameter 'orderId' is set
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
VolleyError error = new VolleyError("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"));
|
new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
||||||
@ -162,7 +160,7 @@ public class StoreApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||||
@ -225,15 +223,15 @@ public class StoreApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void getInventory (final Response.Listener<Map<String, Integer>> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/inventory".replaceAll("\\{format\\}","json");
|
String path = "/store/inventory".replaceAll("\\{format\\}","json");
|
||||||
@ -275,7 +272,7 @@ public class StoreApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { "api_key" };
|
String[] authNames = new String[] { "api_key" };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
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
|
* @param orderId ID of pet that needs to be fetched
|
||||||
* @return Order
|
* @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;
|
Object postBody = null;
|
||||||
// verify the required parameter 'orderId' is set
|
// verify the required parameter 'orderId' is set
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
@ -348,15 +345,15 @@ public class StoreApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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
|
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||||
* @param orderId ID of pet that needs to be fetched
|
* @param orderId ID of pet that needs to be fetched
|
||||||
*/
|
*/
|
||||||
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;
|
Object postBody = null;
|
||||||
|
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
// verify the required parameter 'orderId' is set
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
VolleyError error = new VolleyError("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"));
|
new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
String path = "/store/order/{orderId}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "orderId" + "\\}", apiInvoker.escapeString(orderId.toString()));
|
||||||
@ -404,7 +399,7 @@ public class StoreApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
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 {
|
public Order placeOrder (Order body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = body;
|
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
|
// create path and map variables
|
||||||
String path = "/store/order";
|
String path = "/store/order";
|
||||||
@ -472,15 +472,15 @@ public class StoreApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void placeOrder (Order body, final Response.Listener<Order> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = body;
|
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
|
// create path and map variables
|
||||||
String path = "/store/order".replaceAll("\\{format\\}","json");
|
String path = "/store/order".replaceAll("\\{format\\}","json");
|
||||||
@ -522,7 +526,7 @@ public class StoreApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* 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 {
|
public void createUser (User body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = body;
|
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
|
// create path and map variables
|
||||||
String path = "/user";
|
String path = "/user";
|
||||||
@ -101,15 +106,15 @@ public class UserApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void createUser (User body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = body;
|
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
|
// create path and map variables
|
||||||
String path = "/user".replaceAll("\\{format\\}","json");
|
String path = "/user".replaceAll("\\{format\\}","json");
|
||||||
@ -151,7 +160,7 @@ public class UserApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
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 {
|
public void createUsersWithArrayInput (List<User> body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = body;
|
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
|
// create path and map variables
|
||||||
String path = "/user/createWithArray";
|
String path = "/user/createWithArray";
|
||||||
@ -215,15 +229,15 @@ public class UserApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void createUsersWithArrayInput (List<User> body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = body;
|
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
|
// create path and map variables
|
||||||
String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
String path = "/user/createWithArray".replaceAll("\\{format\\}","json");
|
||||||
@ -265,7 +283,7 @@ public class UserApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
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 {
|
public void createUsersWithListInput (List<User> body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = body;
|
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
|
// create path and map variables
|
||||||
String path = "/user/createWithList";
|
String path = "/user/createWithList";
|
||||||
@ -329,15 +352,15 @@ public class UserApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void createUsersWithListInput (List<User> body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = body;
|
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
|
// create path and map variables
|
||||||
String path = "/user/createWithList".replaceAll("\\{format\\}","json");
|
String path = "/user/createWithList".replaceAll("\\{format\\}","json");
|
||||||
@ -379,7 +406,7 @@ public class UserApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
apiInvoker.invokeAPI(basePath, path, "POST", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||||
@ -448,15 +475,15 @@ public class UserApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void deleteUser (String username, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
VolleyError error = new VolleyError("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"));
|
new ApiException(400, "Missing the required parameter 'username' when calling deleteUser"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||||
@ -504,7 +529,7 @@ public class UserApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
apiInvoker.invokeAPI(basePath, path, "DELETE", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||||
@ -573,15 +598,15 @@ public class UserApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void getUserByName (String username, final Response.Listener<User> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
VolleyError error = new VolleyError("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"));
|
new ApiException(400, "Missing the required parameter 'username' when calling getUserByName"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||||
@ -629,7 +652,7 @@ public class UserApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
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 {
|
public String loginUser (String username, String password) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = null;
|
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
|
// create path and map variables
|
||||||
String path = "/user/login";
|
String path = "/user/login";
|
||||||
@ -700,15 +733,15 @@ public class UserApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void loginUser (String username, String password, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = null;
|
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
|
// create path and map variables
|
||||||
String path = "/user/login".replaceAll("\\{format\\}","json");
|
String path = "/user/login".replaceAll("\\{format\\}","json");
|
||||||
@ -752,7 +794,7 @@ public class UserApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||||
@ -819,15 +861,15 @@ public class UserApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void logoutUser (final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
String path = "/user/logout".replaceAll("\\{format\\}","json");
|
String path = "/user/logout".replaceAll("\\{format\\}","json");
|
||||||
@ -869,7 +910,7 @@ public class UserApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
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",
|
VolleyError error = new VolleyError("Missing the required parameter 'username' when calling updateUser",
|
||||||
new ApiException(400, "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
|
// create path and map variables
|
||||||
String path = "/user/{username}".replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
String path = "/user/{username}".replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||||
@ -939,15 +985,15 @@ public class UserApi {
|
|||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (ExecutionException ex) {
|
} catch (ExecutionException ex) {
|
||||||
if (ex.getCause() instanceof VolleyError) {
|
if (ex.getCause() instanceof VolleyError) {
|
||||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||||
if (volleyError.networkResponse != null) {
|
if (volleyError.networkResponse != null) {
|
||||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
throw ex;
|
throw ex;
|
||||||
} catch (TimeoutException 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) {
|
public void updateUser (String username, User body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = body;
|
Object postBody = body;
|
||||||
|
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
VolleyError error = new VolleyError("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"));
|
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
|
// create path and map variables
|
||||||
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
String path = "/user/{username}".replaceAll("\\{format\\}","json").replaceAll("\\{" + "username" + "\\}", apiInvoker.escapeString(username.toString()));
|
||||||
@ -995,7 +1044,7 @@ public class UserApi {
|
|||||||
// normal form params
|
// normal form params
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] authNames = new String[] { };
|
String[] authNames = new String[] { };
|
||||||
|
|
||||||
try {
|
try {
|
||||||
apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
apiInvoker.invokeAPI(basePath, path, "PUT", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* 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
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -15,7 +15,10 @@ package io.swagger.client.model;
|
|||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
@ApiModel(description = "")
|
/**
|
||||||
|
* A category for a pet
|
||||||
|
**/
|
||||||
|
@ApiModel(description = "A category for a pet")
|
||||||
public class Category {
|
public class Category {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -16,7 +16,10 @@ import java.util.Date;
|
|||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import com.google.gson.annotations.SerializedName;
|
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 {
|
public class Order {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -18,7 +18,10 @@ import java.util.*;
|
|||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import com.google.gson.annotations.SerializedName;
|
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 {
|
public class Pet {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -15,7 +15,10 @@ package io.swagger.client.model;
|
|||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
@ApiModel(description = "")
|
/**
|
||||||
|
* A tag for a pet
|
||||||
|
**/
|
||||||
|
@ApiModel(description = "A tag for a pet")
|
||||||
public class Tag {
|
public class Tag {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
@ -15,7 +15,10 @@ package io.swagger.client.model;
|
|||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
import com.google.gson.annotations.SerializedName;
|
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 {
|
public class User {
|
||||||
|
|
||||||
@SerializedName("id")
|
@SerializedName("id")
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* 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
|
* 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.
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
* https://github.com/swagger-api/swagger-codegen.git
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package io.swagger.api;
|
package io.swagger.api;
|
||||||
|
|
||||||
import io.swagger.model.ModelApiResponse;
|
|
||||||
import io.swagger.model.Pet;
|
import io.swagger.model.Pet;
|
||||||
import org.springframework.core.io.Resource;
|
import org.springframework.core.io.Resource;
|
||||||
|
|
||||||
@ -35,7 +34,7 @@ public interface PetApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.POST)
|
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 = {
|
@ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = {
|
||||||
@ -50,7 +49,7 @@ public interface PetApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.DELETE)
|
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 = {
|
@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",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
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 = {
|
@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",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
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")
|
@Authorization(value = "api_key")
|
||||||
}, tags={ "pet", })
|
}, tags={ "pet", })
|
||||||
@ApiResponses(value = {
|
@ApiResponses(value = {
|
||||||
@ -96,7 +99,7 @@ public interface PetApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
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 = {
|
@ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
|
||||||
@ -113,7 +116,7 @@ public interface PetApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.PUT)
|
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 = {
|
@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",
|
produces = "application/json",
|
||||||
consumes = "application/x-www-form-urlencoded",
|
consumes = "application/x-www-form-urlencoded",
|
||||||
method = RequestMethod.POST)
|
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 = {
|
@Authorization(value = "petstore_auth", scopes = {
|
||||||
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||||
})
|
})
|
||||||
}, tags={ "pet", })
|
}, tags={ "pet", })
|
||||||
@ApiResponses(value = {
|
@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",
|
@RequestMapping(value = "/pet/{petId}/uploadImage",
|
||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "multipart/form-data",
|
consumes = "multipart/form-data",
|
||||||
method = RequestMethod.POST)
|
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",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.DELETE)
|
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 = {
|
@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",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
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", })
|
@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",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
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", })
|
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", })
|
||||||
@ -65,6 +65,6 @@ public interface StoreApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.POST)
|
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",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.POST)
|
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", })
|
@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",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.POST)
|
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", })
|
@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",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.POST)
|
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", })
|
@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",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.DELETE)
|
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", })
|
@ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
|
||||||
@ -72,7 +72,7 @@ public interface UserApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
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", })
|
@ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
|
||||||
@ -83,7 +83,7 @@ public interface UserApi {
|
|||||||
produces = "application/json",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
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", })
|
@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",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.GET)
|
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", })
|
@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",
|
produces = "application/json",
|
||||||
consumes = "application/json",
|
consumes = "application/json",
|
||||||
method = RequestMethod.PUT)
|
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.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A category for a pet
|
* Category
|
||||||
*/
|
*/
|
||||||
@ApiModel(description = "A category for a pet")
|
|
||||||
|
|
||||||
public class Category {
|
public class Category {
|
||||||
@JsonProperty("id")
|
@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.*;
|
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 {
|
public class Order {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
@ -65,7 +64,7 @@ public class Order {
|
|||||||
private StatusEnum status = null;
|
private StatusEnum status = null;
|
||||||
|
|
||||||
@JsonProperty("complete")
|
@JsonProperty("complete")
|
||||||
private Boolean complete = false;
|
private Boolean complete = null;
|
||||||
|
|
||||||
public Order id(Long id) {
|
public Order id(Long id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
@ -14,9 +14,8 @@ import javax.validation.Valid;
|
|||||||
import javax.validation.constraints.*;
|
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 {
|
public class Pet {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
|
@ -9,9 +9,8 @@ import javax.validation.Valid;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A tag for a pet
|
* Tag
|
||||||
*/
|
*/
|
||||||
@ApiModel(description = "A tag for a pet")
|
|
||||||
|
|
||||||
public class Tag {
|
public class Tag {
|
||||||
@JsonProperty("id")
|
@JsonProperty("id")
|
||||||
|
@ -9,9 +9,8 @@ import javax.validation.Valid;
|
|||||||
import javax.validation.constraints.*;
|
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 {
|
public class User {
|
||||||
@JsonProperty("id")
|
@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.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
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.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
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.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
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.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
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.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RequestPart;
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user