mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 10:58:55 +00:00
avoid code injection in php api client
This commit is contained in:
parent
31092585f0
commit
1638adb79e
@ -57,6 +57,8 @@ public interface CodegenConfig {
|
|||||||
|
|
||||||
String escapeText(String text);
|
String escapeText(String text);
|
||||||
|
|
||||||
|
String escapeUnsafeCharacters(String input);
|
||||||
|
|
||||||
String escapeReservedWord(String name);
|
String escapeReservedWord(String name);
|
||||||
|
|
||||||
String getTypeDeclaration(Property p);
|
String getTypeDeclaration(Property p);
|
||||||
|
@ -330,13 +330,29 @@ public class DefaultCodegen {
|
|||||||
// override with any special text escaping logic
|
// override with any special text escaping logic
|
||||||
@SuppressWarnings("static-method")
|
@SuppressWarnings("static-method")
|
||||||
public String escapeText(String input) {
|
public String escapeText(String input) {
|
||||||
if (input != null) {
|
if (input == null) {
|
||||||
// remove \t, \n, \r
|
return input;
|
||||||
// repalce \ with \\
|
|
||||||
// repalce " with \"
|
|
||||||
// outter unescape to retain the original multi-byte characters
|
|
||||||
return StringEscapeUtils.unescapeJava(StringEscapeUtils.escapeJava(input).replace("\\/", "/")).replaceAll("[\\t\\n\\r]"," ").replace("\\", "\\\\").replace("\"", "\\\"");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// remove \t, \n, \r
|
||||||
|
// repalce \ with \\
|
||||||
|
// repalce " with \"
|
||||||
|
// outter unescape to retain the original multi-byte characters
|
||||||
|
// finally escalate characters avoiding code injection
|
||||||
|
return escapeUnsafeCharacters(StringEscapeUtils.unescapeJava(StringEscapeUtils.escapeJava(input).replace("\\/", "/")).replaceAll("[\\t\\n\\r]"," ").replace("\\", "\\\\").replace("\"", "\\\""));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* override with any special text escaping logic to handle unsafe
|
||||||
|
* characters so as to avoid code injection
|
||||||
|
* @param input String to be cleaned up
|
||||||
|
* @return string with unsafe characters removed or escaped
|
||||||
|
*/
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
// doing nothing by default and code generator should implement
|
||||||
|
// the logic to prevent code injection
|
||||||
|
// later we'll make this method abstract to make sure
|
||||||
|
// code generator implements this method
|
||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,10 +144,10 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
|||||||
if (swagger.getInfo() != null) {
|
if (swagger.getInfo() != null) {
|
||||||
Info info = swagger.getInfo();
|
Info info = swagger.getInfo();
|
||||||
if (info.getTitle() != null) {
|
if (info.getTitle() != null) {
|
||||||
config.additionalProperties().put("appName", info.getTitle());
|
config.additionalProperties().put("appName", config.escapeText(info.getTitle()));
|
||||||
}
|
}
|
||||||
if (info.getVersion() != null) {
|
if (info.getVersion() != null) {
|
||||||
config.additionalProperties().put("appVersion", info.getVersion());
|
config.additionalProperties().put("appVersion", config.escapeText(info.getVersion()));
|
||||||
}
|
}
|
||||||
if (info.getDescription() != null) {
|
if (info.getDescription() != null) {
|
||||||
config.additionalProperties().put("appDescription",
|
config.additionalProperties().put("appDescription",
|
||||||
@ -155,25 +155,25 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
|||||||
}
|
}
|
||||||
if (info.getContact() != null) {
|
if (info.getContact() != null) {
|
||||||
Contact contact = info.getContact();
|
Contact contact = info.getContact();
|
||||||
config.additionalProperties().put("infoUrl", contact.getUrl());
|
config.additionalProperties().put("infoUrl", config.escapeText(contact.getUrl()));
|
||||||
if (contact.getEmail() != null) {
|
if (contact.getEmail() != null) {
|
||||||
config.additionalProperties().put("infoEmail", contact.getEmail());
|
config.additionalProperties().put("infoEmail", config.escapeText(contact.getEmail()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (info.getLicense() != null) {
|
if (info.getLicense() != null) {
|
||||||
License license = info.getLicense();
|
License license = info.getLicense();
|
||||||
if (license.getName() != null) {
|
if (license.getName() != null) {
|
||||||
config.additionalProperties().put("licenseInfo", license.getName());
|
config.additionalProperties().put("licenseInfo", config.escapeText(license.getName()));
|
||||||
}
|
}
|
||||||
if (license.getUrl() != null) {
|
if (license.getUrl() != null) {
|
||||||
config.additionalProperties().put("licenseUrl", license.getUrl());
|
config.additionalProperties().put("licenseUrl", config.escapeText(license.getUrl()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (info.getVersion() != null) {
|
if (info.getVersion() != null) {
|
||||||
config.additionalProperties().put("version", info.getVersion());
|
config.additionalProperties().put("version", config.escapeText(info.getVersion()));
|
||||||
}
|
}
|
||||||
if (info.getTermsOfService() != null) {
|
if (info.getTermsOfService() != null) {
|
||||||
config.additionalProperties().put("termsOfService", info.getTermsOfService());
|
config.additionalProperties().put("termsOfService", config.escapeText(info.getTermsOfService()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -184,7 +184,7 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
|
|||||||
StringBuilder hostBuilder = new StringBuilder();
|
StringBuilder hostBuilder = new StringBuilder();
|
||||||
String scheme;
|
String scheme;
|
||||||
if (swagger.getSchemes() != null && swagger.getSchemes().size() > 0) {
|
if (swagger.getSchemes() != null && swagger.getSchemes().size() > 0) {
|
||||||
scheme = swagger.getSchemes().get(0).toValue();
|
scheme = config.escapeText(swagger.getSchemes().get(0).toValue());
|
||||||
} else {
|
} else {
|
||||||
scheme = "https";
|
scheme = "https";
|
||||||
}
|
}
|
||||||
|
@ -662,4 +662,10 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
}
|
}
|
||||||
return objs;
|
return objs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String escapeUnsafeCharacters(String input) {
|
||||||
|
return input.replace("*/", "");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -85,11 +85,15 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
/**
|
/**
|
||||||
* Operation {{{operationId}}}
|
* Operation {{{operationId}}}
|
||||||
*
|
*
|
||||||
* {{{summary}}}.
|
* {{{summary}}}
|
||||||
*/
|
*
|
||||||
{{#allParams}} // * @param {{dataType}} ${{paramName}} {{description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
{{#description}}
|
||||||
{{/allParams}}
|
* {{.}}
|
||||||
/**
|
*
|
||||||
|
{{/description}}
|
||||||
|
{{#allParams}}
|
||||||
|
* @param {{dataType}} ${{paramName}} {{description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||||
|
{{/allParams}}
|
||||||
* @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
* @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
|
||||||
* @throws \{{invokerPackage}}\ApiException on non-2xx response
|
* @throws \{{invokerPackage}}\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -99,21 +103,25 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation {{{operationId}}}WithHttpInfo
|
* Operation {{{operationId}}}WithHttpInfo
|
||||||
*
|
*
|
||||||
* {{{summary}}}.
|
* {{{summary}}}
|
||||||
*/
|
*
|
||||||
{{#allParams}} // * @param {{dataType}} ${{paramName}} {{description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
{{#description}}
|
||||||
{{/allParams}}
|
* {{.}}
|
||||||
/**
|
*
|
||||||
|
{{/description}}
|
||||||
|
{{#allParams}}
|
||||||
|
* @param {{dataType}} ${{paramName}} {{description}} {{#required}}(required){{/required}}{{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
|
||||||
|
{{/allParams}}
|
||||||
* @return Array of {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}null{{/returnType}}, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}null{{/returnType}}, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \{{invokerPackage}}\ApiException on non-2xx response
|
* @throws \{{invokerPackage}}\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function {{operationId}}WithHttpInfo({{#allParams}}${{paramName}}{{^required}} = null{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
public function {{operationId}}WithHttpInfo({{#allParams}}${{paramName}}{{^required}} = null{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||||
{
|
{
|
||||||
{{#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 \InvalidArgumentException('Missing the required parameter ${{paramName}} when calling {{operationId}}');
|
throw new \InvalidArgumentException('Missing the required parameter ${{paramName}} when calling {{operationId}}');
|
||||||
@ -148,7 +156,6 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
|
|
||||||
{{/hasValidation}}
|
{{/hasValidation}}
|
||||||
{{/allParams}}
|
{{/allParams}}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "{{path}}";
|
$resourcePath = "{{path}}";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -161,7 +168,8 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array({{#consumes}}'{{{mediaType}}}'{{#hasMore}},{{/hasMore}}{{/consumes}}));
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array({{#consumes}}'{{{mediaType}}}'{{#hasMore}},{{/hasMore}}{{/consumes}}));
|
||||||
|
|
||||||
{{#queryParams}}// query params
|
{{#queryParams}}
|
||||||
|
// query params
|
||||||
{{#collectionFormat}}
|
{{#collectionFormat}}
|
||||||
if (is_array(${{paramName}})) {
|
if (is_array(${{paramName}})) {
|
||||||
${{paramName}} = $this->apiClient->getSerializer()->serializeCollection(${{paramName}}, '{{collectionFormat}}', true);
|
${{paramName}} = $this->apiClient->getSerializer()->serializeCollection(${{paramName}}, '{{collectionFormat}}', true);
|
||||||
@ -169,8 +177,10 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
{{/collectionFormat}}
|
{{/collectionFormat}}
|
||||||
if (${{paramName}} !== null) {
|
if (${{paramName}} !== null) {
|
||||||
$queryParams['{{baseName}}'] = $this->apiClient->getSerializer()->toQueryValue(${{paramName}});
|
$queryParams['{{baseName}}'] = $this->apiClient->getSerializer()->toQueryValue(${{paramName}});
|
||||||
}{{/queryParams}}
|
}
|
||||||
{{#headerParams}}// header params
|
{{/queryParams}}
|
||||||
|
{{#headerParams}}
|
||||||
|
// header params
|
||||||
{{#collectionFormat}}
|
{{#collectionFormat}}
|
||||||
if (is_array(${{paramName}})) {
|
if (is_array(${{paramName}})) {
|
||||||
${{paramName}} = $this->apiClient->getSerializer()->serializeCollection(${{paramName}}, '{{collectionFormat}}');
|
${{paramName}} = $this->apiClient->getSerializer()->serializeCollection(${{paramName}}, '{{collectionFormat}}');
|
||||||
@ -178,8 +188,10 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
{{/collectionFormat}}
|
{{/collectionFormat}}
|
||||||
if (${{paramName}} !== null) {
|
if (${{paramName}} !== null) {
|
||||||
$headerParams['{{baseName}}'] = $this->apiClient->getSerializer()->toHeaderValue(${{paramName}});
|
$headerParams['{{baseName}}'] = $this->apiClient->getSerializer()->toHeaderValue(${{paramName}});
|
||||||
}{{/headerParams}}
|
}
|
||||||
{{#pathParams}}// path params
|
{{/headerParams}}
|
||||||
|
{{#pathParams}}
|
||||||
|
// path params
|
||||||
{{#collectionFormat}}
|
{{#collectionFormat}}
|
||||||
if (is_array(${{paramName}})) {
|
if (is_array(${{paramName}})) {
|
||||||
${{paramName}} = $this->apiClient->getSerializer()->serializeCollection(${{paramName}}, '{{collectionFormat}}');
|
${{paramName}} = $this->apiClient->getSerializer()->serializeCollection(${{paramName}}, '{{collectionFormat}}');
|
||||||
@ -191,11 +203,13 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
$this->apiClient->getSerializer()->toPathValue(${{paramName}}),
|
$this->apiClient->getSerializer()->toPathValue(${{paramName}}),
|
||||||
$resourcePath
|
$resourcePath
|
||||||
);
|
);
|
||||||
}{{/pathParams}}
|
}
|
||||||
|
{{/pathParams}}
|
||||||
// default format to json
|
// default format to json
|
||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
{{#formParams}}// form params
|
{{#formParams}}
|
||||||
|
// form params
|
||||||
if (${{paramName}} !== null) {
|
if (${{paramName}} !== null) {
|
||||||
{{#isFile}}
|
{{#isFile}}
|
||||||
// PHP 5.5 introduced a CurlFile object that deprecates the old @filename syntax
|
// PHP 5.5 introduced a CurlFile object that deprecates the old @filename syntax
|
||||||
@ -209,12 +223,14 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
{{^isFile}}
|
{{^isFile}}
|
||||||
$formParams['{{baseName}}'] = $this->apiClient->getSerializer()->toFormValue(${{paramName}});
|
$formParams['{{baseName}}'] = $this->apiClient->getSerializer()->toFormValue(${{paramName}});
|
||||||
{{/isFile}}
|
{{/isFile}}
|
||||||
}{{/formParams}}
|
}
|
||||||
|
{{/formParams}}
|
||||||
{{#bodyParams}}// body params
|
{{#bodyParams}}// body params
|
||||||
$_tempBody = null;
|
$_tempBody = null;
|
||||||
if (isset(${{paramName}})) {
|
if (isset(${{paramName}})) {
|
||||||
$_tempBody = ${{paramName}};
|
$_tempBody = ${{paramName}};
|
||||||
}{{/bodyParams}}
|
}
|
||||||
|
{{/bodyParams}}
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
@ -222,19 +238,26 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
{{#authMethods}}{{#isApiKey}}
|
{{#authMethods}}
|
||||||
|
{{#isApiKey}}
|
||||||
// this endpoint requires API key authentication
|
// this endpoint requires API key authentication
|
||||||
$apiKey = $this->apiClient->getApiKeyWithPrefix('{{keyParamName}}');
|
$apiKey = $this->apiClient->getApiKeyWithPrefix('{{keyParamName}}');
|
||||||
if (strlen($apiKey) !== 0) {
|
if (strlen($apiKey) !== 0) {
|
||||||
{{#isKeyInHeader}}$headerParams['{{keyParamName}}'] = $apiKey;{{/isKeyInHeader}}{{#isKeyInQuery}}$queryParams['{{keyParamName}}'] = $apiKey;{{/isKeyInQuery}}
|
{{#isKeyInHeader}}$headerParams['{{keyParamName}}'] = $apiKey;{{/isKeyInHeader}}{{#isKeyInQuery}}$queryParams['{{keyParamName}}'] = $apiKey;{{/isKeyInQuery}}
|
||||||
}{{/isApiKey}}
|
}
|
||||||
{{#isBasic}}// this endpoint requires HTTP basic authentication
|
{{/isApiKey}}
|
||||||
|
{{#isBasic}}
|
||||||
|
// this endpoint requires HTTP basic authentication
|
||||||
if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) {
|
if (strlen($this->apiClient->getConfig()->getUsername()) !== 0 or strlen($this->apiClient->getConfig()->getPassword()) !== 0) {
|
||||||
$headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword());
|
$headerParams['Authorization'] = 'Basic ' . base64_encode($this->apiClient->getConfig()->getUsername() . ":" . $this->apiClient->getConfig()->getPassword());
|
||||||
}{{/isBasic}}{{#isOAuth}}// this endpoint requires OAuth (access token)
|
}
|
||||||
|
{{/isBasic}}
|
||||||
|
{{#isOAuth}}
|
||||||
|
// this endpoint requires OAuth (access token)
|
||||||
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
||||||
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
||||||
}{{/isOAuth}}
|
}
|
||||||
|
{{/isOAuth}}
|
||||||
{{/authMethods}}
|
{{/authMethods}}
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
@ -268,6 +291,7 @@ use \{{invokerPackage}}\ObjectSerializer;
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
}
|
}
|
||||||
{{/operations}}
|
{{/operations}}
|
||||||
|
@ -24,8 +24,6 @@ namespace {{modelPackage}};
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {{classname}} Class Doc Comment
|
* {{classname}} Class Doc Comment
|
||||||
*
|
*
|
||||||
|
@ -2,11 +2,12 @@
|
|||||||
{{#appName}}
|
{{#appName}}
|
||||||
* {{{appName}}}
|
* {{{appName}}}
|
||||||
*
|
*
|
||||||
{{/appName}} */
|
{{/appName}}
|
||||||
{{#appDescription}}
|
{{#appDescription}}
|
||||||
//* {{{appDescription}}}
|
* {{{appDescription}}}
|
||||||
|
*
|
||||||
{{/appDescription}}
|
{{/appDescription}}
|
||||||
/* {{#version}}OpenAPI spec version: {{{version}}}{{/version}}
|
* {{#version}}OpenAPI spec version: {{{version}}}{{/version}}
|
||||||
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
swagger: '2.0'
|
swagger: '2.0'
|
||||||
info:
|
info:
|
||||||
description: 'This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: " \ '
|
description: 'This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: " \ */ =end'
|
||||||
version: 1.0.0
|
version: 1.0.0 */ =end
|
||||||
title: Swagger Petstore
|
title: Swagger Petstore */ =end
|
||||||
termsOfService: 'http://swagger.io/terms/'
|
termsOfService: 'http://swagger.io/terms/ */ =end'
|
||||||
contact:
|
contact:
|
||||||
email: apiteam@swagger.io
|
email: apiteam@swagger.io */ =end
|
||||||
license:
|
license:
|
||||||
name: Apache 2.0
|
name: Apache 2.0 */ =end
|
||||||
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
|
url: 'http://www.apache.org/licenses/LICENSE-2.0.html */ =end'
|
||||||
host: petstore.swagger.io
|
host: petstore.swagger.io */ =end
|
||||||
basePath: /v2
|
basePath: /v2 */ =end
|
||||||
tags:
|
tags:
|
||||||
- name: pet
|
- name: pet
|
||||||
description: Everything about your Pets
|
description: Everything about your Pets
|
||||||
@ -25,7 +25,7 @@ tags:
|
|||||||
description: Find out more about our store
|
description: Find out more about our store
|
||||||
url: 'http://swagger.io'
|
url: 'http://swagger.io'
|
||||||
schemes:
|
schemes:
|
||||||
- http
|
- http */ end
|
||||||
paths:
|
paths:
|
||||||
/pet:
|
/pet:
|
||||||
post:
|
post:
|
||||||
@ -561,6 +561,26 @@ paths:
|
|||||||
description: User not found
|
description: User not found
|
||||||
|
|
||||||
/fake:
|
/fake:
|
||||||
|
put:
|
||||||
|
tags:
|
||||||
|
- fake
|
||||||
|
summary: To test code injection */ =end
|
||||||
|
descriptions: To test code injection */ =end
|
||||||
|
operationId: testCodeInject */ =end
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
- '*/ =end'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
- '*/ end'
|
||||||
|
parameters:
|
||||||
|
- name: test code inject */ =end
|
||||||
|
type: string
|
||||||
|
in: formData
|
||||||
|
description: To test code injection */ =end
|
||||||
|
responses:
|
||||||
|
'400':
|
||||||
|
description: To test code injection */ =end
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- fake
|
- fake
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# SwaggerClient-php
|
# SwaggerClient-php
|
||||||
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
|
|
||||||
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
This PHP package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
||||||
|
|
||||||
- API version: 1.0.0
|
- API version: 1.0.0 =end
|
||||||
- Build date: 2016-06-26T17:14:27.763+08:00
|
- Build date: 2016-06-27T21:51:01.263+08:00
|
||||||
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
|
- Build package: class io.swagger.codegen.languages.PhpClientCodegen
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
@ -58,23 +58,12 @@ Please follow the [installation procedure](#installation--usage) and then run th
|
|||||||
require_once(__DIR__ . '/vendor/autoload.php');
|
require_once(__DIR__ . '/vendor/autoload.php');
|
||||||
|
|
||||||
$api_instance = new Swagger\Client\Api\FakeApi();
|
$api_instance = new Swagger\Client\Api\FakeApi();
|
||||||
$number = 3.4; // float | None
|
$test_code_inject__end = "test_code_inject__end_example"; // string | To test code injection =end
|
||||||
$double = 1.2; // double | None
|
|
||||||
$string = "string_example"; // string | None
|
|
||||||
$byte = "B"; // string | None
|
|
||||||
$integer = 56; // int | None
|
|
||||||
$int32 = 56; // int | None
|
|
||||||
$int64 = 789; // int | None
|
|
||||||
$float = 3.4; // float | None
|
|
||||||
$binary = "B"; // string | None
|
|
||||||
$date = new \DateTime(); // \DateTime | None
|
|
||||||
$date_time = new \DateTime(); // \DateTime | None
|
|
||||||
$password = "password_example"; // string | None
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$api_instance->testEndpointParameters($number, $double, $string, $byte, $integer, $int32, $int64, $float, $binary, $date, $date_time, $password);
|
$api_instance->testCodeInjectEnd($test_code_inject__end);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
echo 'Exception when calling FakeApi->testEndpointParameters: ', $e->getMessage(), PHP_EOL;
|
echo 'Exception when calling FakeApi->testCodeInjectEnd: ', $e->getMessage(), PHP_EOL;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -82,10 +71,11 @@ try {
|
|||||||
|
|
||||||
## Documentation for API Endpoints
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
All URIs are relative to *https://petstore.swagger.io */ =end/v2 */ =end*
|
||||||
|
|
||||||
Class | Method | HTTP request | Description
|
Class | Method | HTTP request | Description
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
|
*FakeApi* | [**testCodeInjectEnd**](docs/Api/FakeApi.md#testcodeinjectend) | **PUT** /fake | To test code injection =end
|
||||||
*FakeApi* | [**testEndpointParameters**](docs/Api/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
*FakeApi* | [**testEndpointParameters**](docs/Api/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
*FakeApi* | [**testEnumQueryParameters**](docs/Api/FakeApi.md#testenumqueryparameters) | **GET** /fake | To test enum query parameters
|
*FakeApi* | [**testEnumQueryParameters**](docs/Api/FakeApi.md#testenumqueryparameters) | **GET** /fake | To test enum query parameters
|
||||||
*PetApi* | [**addPet**](docs/Api/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
|
*PetApi* | [**addPet**](docs/Api/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store
|
||||||
@ -161,6 +151,6 @@ Class | Method | HTTP request | Description
|
|||||||
|
|
||||||
## Author
|
## Author
|
||||||
|
|
||||||
apiteam@swagger.io
|
apiteam@swagger.io =end
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@ -1,13 +1,56 @@
|
|||||||
# Swagger\Client\FakeApi
|
# Swagger\Client\FakeApi
|
||||||
|
|
||||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
All URIs are relative to *https://petstore.swagger.io */ =end/v2 */ =end*
|
||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
[**testCodeInjectEnd**](FakeApi.md#testCodeInjectEnd) | **PUT** /fake | To test code injection =end
|
||||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
[**testEnumQueryParameters**](FakeApi.md#testEnumQueryParameters) | **GET** /fake | To test enum query parameters
|
[**testEnumQueryParameters**](FakeApi.md#testEnumQueryParameters) | **GET** /fake | To test enum query parameters
|
||||||
|
|
||||||
|
|
||||||
|
# **testCodeInjectEnd**
|
||||||
|
> testCodeInjectEnd($test_code_inject__end)
|
||||||
|
|
||||||
|
To test code injection =end
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```php
|
||||||
|
<?php
|
||||||
|
require_once(__DIR__ . '/vendor/autoload.php');
|
||||||
|
|
||||||
|
$api_instance = new Swagger\Client\Api\FakeApi();
|
||||||
|
$test_code_inject__end = "test_code_inject__end_example"; // string | To test code injection =end
|
||||||
|
|
||||||
|
try {
|
||||||
|
$api_instance->testCodeInjectEnd($test_code_inject__end);
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo 'Exception when calling FakeApi->testCodeInjectEnd: ', $e->getMessage(), PHP_EOL;
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**test_code_inject__end** | **string**| To test code injection =end | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
void (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: application/json, */ =end
|
||||||
|
- **Accept**: application/json, */ end
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
|
||||||
|
|
||||||
# **testEndpointParameters**
|
# **testEndpointParameters**
|
||||||
> testEndpointParameters($number, $double, $string, $byte, $integer, $int32, $int64, $float, $binary, $date, $date_time, $password)
|
> testEndpointParameters($number, $double, $string, $byte, $integer, $int32, $int64, $float, $binary, $date, $date_time, $password)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Swagger\Client\PetApi
|
# Swagger\Client\PetApi
|
||||||
|
|
||||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
All URIs are relative to *https://petstore.swagger.io */ =end/v2 */ =end*
|
||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Swagger\Client\StoreApi
|
# Swagger\Client\StoreApi
|
||||||
|
|
||||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
All URIs are relative to *https://petstore.swagger.io */ =end/v2 */ =end*
|
||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Swagger\Client\UserApi
|
# Swagger\Client\UserApi
|
||||||
|
|
||||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
All URIs are relative to *https://petstore.swagger.io */ =end/v2 */ =end*
|
||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -73,7 +73,7 @@ class FakeApi
|
|||||||
{
|
{
|
||||||
if ($apiClient == null) {
|
if ($apiClient == null) {
|
||||||
$apiClient = new ApiClient();
|
$apiClient = new ApiClient();
|
||||||
$apiClient->getConfig()->setHost('http://petstore.swagger.io/v2');
|
$apiClient->getConfig()->setHost('https://petstore.swagger.io */ =end/v2 */ =end');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->apiClient = $apiClient;
|
$this->apiClient = $apiClient;
|
||||||
@ -102,10 +102,81 @@ class FakeApi
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Operation testCodeInjectEnd
|
||||||
|
*
|
||||||
|
* To test code injection =end
|
||||||
|
*
|
||||||
|
* @param string $test_code_inject__end To test code injection =end (optional)
|
||||||
|
* @return void
|
||||||
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
|
*/
|
||||||
|
public function testCodeInjectEnd($test_code_inject__end = null)
|
||||||
|
{
|
||||||
|
list($response) = $this->testCodeInjectEndWithHttpInfo($test_code_inject__end);
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Operation testCodeInjectEndWithHttpInfo
|
||||||
|
*
|
||||||
|
* To test code injection =end
|
||||||
|
*
|
||||||
|
* @param string $test_code_inject__end To test code injection =end (optional)
|
||||||
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
|
*/
|
||||||
|
public function testCodeInjectEndWithHttpInfo($test_code_inject__end = null)
|
||||||
|
{
|
||||||
|
// parse inputs
|
||||||
|
$resourcePath = "/fake";
|
||||||
|
$httpBody = '';
|
||||||
|
$queryParams = array();
|
||||||
|
$headerParams = array();
|
||||||
|
$formParams = array();
|
||||||
|
$_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', '*/ end'));
|
||||||
|
if (!is_null($_header_accept)) {
|
||||||
|
$headerParams['Accept'] = $_header_accept;
|
||||||
|
}
|
||||||
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','*/ =end'));
|
||||||
|
|
||||||
|
// default format to json
|
||||||
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
// form params
|
||||||
|
if ($test_code_inject__end !== null) {
|
||||||
|
$formParams['test code inject */ =end'] = $this->apiClient->getSerializer()->toFormValue($test_code_inject__end);
|
||||||
|
}
|
||||||
|
|
||||||
|
// for model (json/xml)
|
||||||
|
if (isset($_tempBody)) {
|
||||||
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
|
} elseif (count($formParams) > 0) {
|
||||||
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
|
}
|
||||||
|
// make the API Call
|
||||||
|
try {
|
||||||
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
|
$resourcePath,
|
||||||
|
'PUT',
|
||||||
|
$queryParams,
|
||||||
|
$httpBody,
|
||||||
|
$headerParams
|
||||||
|
);
|
||||||
|
|
||||||
|
return array(null, $statusCode, $httpHeader);
|
||||||
|
} catch (ApiException $e) {
|
||||||
|
switch ($e->getCode()) {
|
||||||
|
}
|
||||||
|
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation testEndpointParameters
|
* Operation testEndpointParameters
|
||||||
*
|
*
|
||||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트.
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
*
|
*
|
||||||
* @param float $number None (required)
|
* @param float $number None (required)
|
||||||
* @param double $double None (required)
|
* @param double $double None (required)
|
||||||
@ -119,7 +190,6 @@ class FakeApi
|
|||||||
* @param \DateTime $date None (optional)
|
* @param \DateTime $date None (optional)
|
||||||
* @param \DateTime $date_time None (optional)
|
* @param \DateTime $date_time None (optional)
|
||||||
* @param string $password None (optional)
|
* @param string $password None (optional)
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -129,11 +199,10 @@ class FakeApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation testEndpointParametersWithHttpInfo
|
* Operation testEndpointParametersWithHttpInfo
|
||||||
*
|
*
|
||||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트.
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
*
|
*
|
||||||
* @param float $number None (required)
|
* @param float $number None (required)
|
||||||
* @param double $double None (required)
|
* @param double $double None (required)
|
||||||
@ -147,13 +216,11 @@ class FakeApi
|
|||||||
* @param \DateTime $date None (optional)
|
* @param \DateTime $date None (optional)
|
||||||
* @param \DateTime $date_time None (optional)
|
* @param \DateTime $date_time None (optional)
|
||||||
* @param string $password None (optional)
|
* @param string $password None (optional)
|
||||||
*
|
|
||||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function testEndpointParametersWithHttpInfo($number, $double, $string, $byte, $integer = null, $int32 = null, $int64 = null, $float = null, $binary = null, $date = null, $date_time = null, $password = null)
|
public function testEndpointParametersWithHttpInfo($number, $double, $string, $byte, $integer = null, $int32 = null, $int64 = null, $float = null, $binary = null, $date = null, $date_time = null, $password = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'number' is set
|
// verify the required parameter 'number' is set
|
||||||
if ($number === null) {
|
if ($number === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $number when calling testEndpointParameters');
|
throw new \InvalidArgumentException('Missing the required parameter $number when calling testEndpointParameters');
|
||||||
@ -165,7 +232,6 @@ class FakeApi
|
|||||||
throw new \InvalidArgumentException('invalid value for "$number" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 32.1.');
|
throw new \InvalidArgumentException('invalid value for "$number" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 32.1.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// verify the required parameter 'double' is set
|
// verify the required parameter 'double' is set
|
||||||
if ($double === null) {
|
if ($double === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $double when calling testEndpointParameters');
|
throw new \InvalidArgumentException('Missing the required parameter $double when calling testEndpointParameters');
|
||||||
@ -177,7 +243,6 @@ class FakeApi
|
|||||||
throw new \InvalidArgumentException('invalid value for "$double" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 67.8.');
|
throw new \InvalidArgumentException('invalid value for "$double" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 67.8.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// verify the required parameter 'string' is set
|
// verify the required parameter 'string' is set
|
||||||
if ($string === null) {
|
if ($string === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $string when calling testEndpointParameters');
|
throw new \InvalidArgumentException('Missing the required parameter $string when calling testEndpointParameters');
|
||||||
@ -186,7 +251,6 @@ class FakeApi
|
|||||||
throw new \InvalidArgumentException('invalid value for "string" when calling FakeApi.testEndpointParameters, must conform to the pattern /[a-z]/i.');
|
throw new \InvalidArgumentException('invalid value for "string" when calling FakeApi.testEndpointParameters, must conform to the pattern /[a-z]/i.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// verify the required parameter 'byte' is set
|
// verify the required parameter 'byte' is set
|
||||||
if ($byte === null) {
|
if ($byte === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $byte when calling testEndpointParameters');
|
throw new \InvalidArgumentException('Missing the required parameter $byte when calling testEndpointParameters');
|
||||||
@ -216,7 +280,6 @@ class FakeApi
|
|||||||
throw new \InvalidArgumentException('invalid length for "$password" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 10.');
|
throw new \InvalidArgumentException('invalid length for "$password" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 10.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/fake";
|
$resourcePath = "/fake";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -229,58 +292,65 @@ class FakeApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/xml; charset=utf-8','application/json; charset=utf-8'));
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/xml; charset=utf-8','application/json; charset=utf-8'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// default format to json
|
// default format to json
|
||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
// form params
|
// form params
|
||||||
if ($integer !== null) {
|
if ($integer !== null) {
|
||||||
$formParams['integer'] = $this->apiClient->getSerializer()->toFormValue($integer);
|
$formParams['integer'] = $this->apiClient->getSerializer()->toFormValue($integer);
|
||||||
}// form params
|
}
|
||||||
|
// form params
|
||||||
if ($int32 !== null) {
|
if ($int32 !== null) {
|
||||||
$formParams['int32'] = $this->apiClient->getSerializer()->toFormValue($int32);
|
$formParams['int32'] = $this->apiClient->getSerializer()->toFormValue($int32);
|
||||||
}// form params
|
}
|
||||||
|
// form params
|
||||||
if ($int64 !== null) {
|
if ($int64 !== null) {
|
||||||
$formParams['int64'] = $this->apiClient->getSerializer()->toFormValue($int64);
|
$formParams['int64'] = $this->apiClient->getSerializer()->toFormValue($int64);
|
||||||
}// form params
|
}
|
||||||
|
// form params
|
||||||
if ($number !== null) {
|
if ($number !== null) {
|
||||||
$formParams['number'] = $this->apiClient->getSerializer()->toFormValue($number);
|
$formParams['number'] = $this->apiClient->getSerializer()->toFormValue($number);
|
||||||
}// form params
|
}
|
||||||
|
// form params
|
||||||
if ($float !== null) {
|
if ($float !== null) {
|
||||||
$formParams['float'] = $this->apiClient->getSerializer()->toFormValue($float);
|
$formParams['float'] = $this->apiClient->getSerializer()->toFormValue($float);
|
||||||
}// form params
|
}
|
||||||
|
// form params
|
||||||
if ($double !== null) {
|
if ($double !== null) {
|
||||||
$formParams['double'] = $this->apiClient->getSerializer()->toFormValue($double);
|
$formParams['double'] = $this->apiClient->getSerializer()->toFormValue($double);
|
||||||
}// form params
|
}
|
||||||
|
// form params
|
||||||
if ($string !== null) {
|
if ($string !== null) {
|
||||||
$formParams['string'] = $this->apiClient->getSerializer()->toFormValue($string);
|
$formParams['string'] = $this->apiClient->getSerializer()->toFormValue($string);
|
||||||
}// form params
|
}
|
||||||
|
// form params
|
||||||
if ($byte !== null) {
|
if ($byte !== null) {
|
||||||
$formParams['byte'] = $this->apiClient->getSerializer()->toFormValue($byte);
|
$formParams['byte'] = $this->apiClient->getSerializer()->toFormValue($byte);
|
||||||
}// form params
|
}
|
||||||
|
// form params
|
||||||
if ($binary !== null) {
|
if ($binary !== null) {
|
||||||
$formParams['binary'] = $this->apiClient->getSerializer()->toFormValue($binary);
|
$formParams['binary'] = $this->apiClient->getSerializer()->toFormValue($binary);
|
||||||
}// form params
|
}
|
||||||
|
// form params
|
||||||
if ($date !== null) {
|
if ($date !== null) {
|
||||||
$formParams['date'] = $this->apiClient->getSerializer()->toFormValue($date);
|
$formParams['date'] = $this->apiClient->getSerializer()->toFormValue($date);
|
||||||
}// form params
|
}
|
||||||
|
// form params
|
||||||
if ($date_time !== null) {
|
if ($date_time !== null) {
|
||||||
$formParams['dateTime'] = $this->apiClient->getSerializer()->toFormValue($date_time);
|
$formParams['dateTime'] = $this->apiClient->getSerializer()->toFormValue($date_time);
|
||||||
}// form params
|
}
|
||||||
|
// form params
|
||||||
if ($password !== null) {
|
if ($password !== null) {
|
||||||
$formParams['password'] = $this->apiClient->getSerializer()->toFormValue($password);
|
$formParams['password'] = $this->apiClient->getSerializer()->toFormValue($password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath,
|
$resourcePath,
|
||||||
@ -298,15 +368,15 @@ class FakeApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation testEnumQueryParameters
|
* Operation testEnumQueryParameters
|
||||||
*
|
*
|
||||||
* To test enum query parameters.
|
* To test enum query parameters
|
||||||
*
|
*
|
||||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to -efg)
|
* @param string $enum_query_string Query parameter enum test (string) (optional, default to -efg)
|
||||||
* @param float $enum_query_integer Query parameter enum test (double) (optional)
|
* @param float $enum_query_integer Query parameter enum test (double) (optional)
|
||||||
* @param double $enum_query_double Query parameter enum test (double) (optional)
|
* @param double $enum_query_double Query parameter enum test (double) (optional)
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -316,22 +386,19 @@ class FakeApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation testEnumQueryParametersWithHttpInfo
|
* Operation testEnumQueryParametersWithHttpInfo
|
||||||
*
|
*
|
||||||
* To test enum query parameters.
|
* To test enum query parameters
|
||||||
*
|
*
|
||||||
* @param string $enum_query_string Query parameter enum test (string) (optional, default to -efg)
|
* @param string $enum_query_string Query parameter enum test (string) (optional, default to -efg)
|
||||||
* @param float $enum_query_integer Query parameter enum test (double) (optional)
|
* @param float $enum_query_integer Query parameter enum test (double) (optional)
|
||||||
* @param double $enum_query_double Query parameter enum test (double) (optional)
|
* @param double $enum_query_double Query parameter enum test (double) (optional)
|
||||||
*
|
|
||||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function testEnumQueryParametersWithHttpInfo($enum_query_string = null, $enum_query_integer = null, $enum_query_double = null)
|
public function testEnumQueryParametersWithHttpInfo($enum_query_string = null, $enum_query_integer = null, $enum_query_double = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/fake";
|
$resourcePath = "/fake";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -348,27 +415,25 @@ class FakeApi
|
|||||||
if ($enum_query_integer !== null) {
|
if ($enum_query_integer !== null) {
|
||||||
$queryParams['enum_query_integer'] = $this->apiClient->getSerializer()->toQueryValue($enum_query_integer);
|
$queryParams['enum_query_integer'] = $this->apiClient->getSerializer()->toQueryValue($enum_query_integer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// default format to json
|
// default format to json
|
||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
// form params
|
// form params
|
||||||
if ($enum_query_string !== null) {
|
if ($enum_query_string !== null) {
|
||||||
$formParams['enum_query_string'] = $this->apiClient->getSerializer()->toFormValue($enum_query_string);
|
$formParams['enum_query_string'] = $this->apiClient->getSerializer()->toFormValue($enum_query_string);
|
||||||
}// form params
|
}
|
||||||
|
// form params
|
||||||
if ($enum_query_double !== null) {
|
if ($enum_query_double !== null) {
|
||||||
$formParams['enum_query_double'] = $this->apiClient->getSerializer()->toFormValue($enum_query_double);
|
$formParams['enum_query_double'] = $this->apiClient->getSerializer()->toFormValue($enum_query_double);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath,
|
$resourcePath,
|
||||||
@ -386,4 +451,5 @@ class FakeApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -73,7 +73,7 @@ class PetApi
|
|||||||
{
|
{
|
||||||
if ($apiClient == null) {
|
if ($apiClient == null) {
|
||||||
$apiClient = new ApiClient();
|
$apiClient = new ApiClient();
|
||||||
$apiClient->getConfig()->setHost('http://petstore.swagger.io/v2');
|
$apiClient->getConfig()->setHost('https://petstore.swagger.io */ =end/v2 */ =end');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->apiClient = $apiClient;
|
$this->apiClient = $apiClient;
|
||||||
@ -105,10 +105,9 @@ class PetApi
|
|||||||
/**
|
/**
|
||||||
* Operation addPet
|
* Operation addPet
|
||||||
*
|
*
|
||||||
* Add a new pet to the store.
|
* Add a new pet to the store
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -118,25 +117,21 @@ class PetApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation addPetWithHttpInfo
|
* Operation addPetWithHttpInfo
|
||||||
*
|
*
|
||||||
* Add a new pet to the store.
|
* Add a new pet to the store
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
||||||
*
|
|
||||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function addPetWithHttpInfo($body)
|
public function addPetWithHttpInfo($body)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'body' is set
|
||||||
if ($body === null) {
|
if ($body === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling addPet');
|
throw new \InvalidArgumentException('Missing the required parameter $body when calling addPet');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/pet";
|
$resourcePath = "/pet";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -149,13 +144,9 @@ class PetApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/xml'));
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/xml'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// default format to json
|
// default format to json
|
||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
// body params
|
// body params
|
||||||
$_tempBody = null;
|
$_tempBody = null;
|
||||||
if (isset($body)) {
|
if (isset($body)) {
|
||||||
@ -168,7 +159,6 @@ class PetApi
|
|||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
|
|
||||||
// this endpoint requires OAuth (access token)
|
// this endpoint requires OAuth (access token)
|
||||||
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
||||||
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
||||||
@ -191,14 +181,14 @@ class PetApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation deletePet
|
* Operation deletePet
|
||||||
*
|
*
|
||||||
* Deletes a pet.
|
* Deletes a pet
|
||||||
*
|
*
|
||||||
* @param int $pet_id Pet id to delete (required)
|
* @param int $pet_id Pet id to delete (required)
|
||||||
* @param string $api_key (optional)
|
* @param string $api_key (optional)
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -208,26 +198,22 @@ class PetApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation deletePetWithHttpInfo
|
* Operation deletePetWithHttpInfo
|
||||||
*
|
*
|
||||||
* Deletes a pet.
|
* Deletes a pet
|
||||||
*
|
*
|
||||||
* @param int $pet_id Pet id to delete (required)
|
* @param int $pet_id Pet id to delete (required)
|
||||||
* @param string $api_key (optional)
|
* @param string $api_key (optional)
|
||||||
*
|
|
||||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function deletePetWithHttpInfo($pet_id, $api_key = null)
|
public function deletePetWithHttpInfo($pet_id, $api_key = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'pet_id' is set
|
// verify the required parameter 'pet_id' is set
|
||||||
if ($pet_id === null) {
|
if ($pet_id === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $pet_id when calling deletePet');
|
throw new \InvalidArgumentException('Missing the required parameter $pet_id when calling deletePet');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/pet/{petId}";
|
$resourcePath = "/pet/{petId}";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -240,7 +226,6 @@ class PetApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||||
|
|
||||||
|
|
||||||
// header params
|
// header params
|
||||||
if ($api_key !== null) {
|
if ($api_key !== null) {
|
||||||
$headerParams['api_key'] = $this->apiClient->getSerializer()->toHeaderValue($api_key);
|
$headerParams['api_key'] = $this->apiClient->getSerializer()->toHeaderValue($api_key);
|
||||||
@ -257,15 +242,12 @@ class PetApi
|
|||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
|
|
||||||
// this endpoint requires OAuth (access token)
|
// this endpoint requires OAuth (access token)
|
||||||
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
||||||
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
||||||
@ -288,13 +270,13 @@ class PetApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation findPetsByStatus
|
* Operation findPetsByStatus
|
||||||
*
|
*
|
||||||
* Finds Pets by status.
|
* Finds Pets by status
|
||||||
*
|
*
|
||||||
* @param string[] $status Status values that need to be considered for filter (required)
|
* @param string[] $status Status values that need to be considered for filter (required)
|
||||||
*
|
|
||||||
* @return \Swagger\Client\Model\Pet[]
|
* @return \Swagger\Client\Model\Pet[]
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -304,25 +286,21 @@ class PetApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation findPetsByStatusWithHttpInfo
|
* Operation findPetsByStatusWithHttpInfo
|
||||||
*
|
*
|
||||||
* Finds Pets by status.
|
* Finds Pets by status
|
||||||
*
|
*
|
||||||
* @param string[] $status Status values that need to be considered for filter (required)
|
* @param string[] $status Status values that need to be considered for filter (required)
|
||||||
*
|
|
||||||
* @return Array of \Swagger\Client\Model\Pet[], HTTP status code, HTTP response headers (array of strings)
|
* @return Array of \Swagger\Client\Model\Pet[], HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function findPetsByStatusWithHttpInfo($status)
|
public function findPetsByStatusWithHttpInfo($status)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'status' is set
|
// verify the required parameter 'status' is set
|
||||||
if ($status === null) {
|
if ($status === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $status when calling findPetsByStatus');
|
throw new \InvalidArgumentException('Missing the required parameter $status when calling findPetsByStatus');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/pet/findByStatus";
|
$resourcePath = "/pet/findByStatus";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -342,21 +320,16 @@ class PetApi
|
|||||||
if ($status !== null) {
|
if ($status !== null) {
|
||||||
$queryParams['status'] = $this->apiClient->getSerializer()->toQueryValue($status);
|
$queryParams['status'] = $this->apiClient->getSerializer()->toQueryValue($status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// default format to json
|
// default format to json
|
||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
|
|
||||||
// this endpoint requires OAuth (access token)
|
// this endpoint requires OAuth (access token)
|
||||||
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
||||||
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
||||||
@ -384,13 +357,13 @@ class PetApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation findPetsByTags
|
* Operation findPetsByTags
|
||||||
*
|
*
|
||||||
* Finds Pets by tags.
|
* Finds Pets by tags
|
||||||
*
|
*
|
||||||
* @param string[] $tags Tags to filter by (required)
|
* @param string[] $tags Tags to filter by (required)
|
||||||
*
|
|
||||||
* @return \Swagger\Client\Model\Pet[]
|
* @return \Swagger\Client\Model\Pet[]
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -400,25 +373,21 @@ class PetApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation findPetsByTagsWithHttpInfo
|
* Operation findPetsByTagsWithHttpInfo
|
||||||
*
|
*
|
||||||
* Finds Pets by tags.
|
* Finds Pets by tags
|
||||||
*
|
*
|
||||||
* @param string[] $tags Tags to filter by (required)
|
* @param string[] $tags Tags to filter by (required)
|
||||||
*
|
|
||||||
* @return Array of \Swagger\Client\Model\Pet[], HTTP status code, HTTP response headers (array of strings)
|
* @return Array of \Swagger\Client\Model\Pet[], HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function findPetsByTagsWithHttpInfo($tags)
|
public function findPetsByTagsWithHttpInfo($tags)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'tags' is set
|
// verify the required parameter 'tags' is set
|
||||||
if ($tags === null) {
|
if ($tags === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $tags when calling findPetsByTags');
|
throw new \InvalidArgumentException('Missing the required parameter $tags when calling findPetsByTags');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/pet/findByTags";
|
$resourcePath = "/pet/findByTags";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -438,21 +407,16 @@ class PetApi
|
|||||||
if ($tags !== null) {
|
if ($tags !== null) {
|
||||||
$queryParams['tags'] = $this->apiClient->getSerializer()->toQueryValue($tags);
|
$queryParams['tags'] = $this->apiClient->getSerializer()->toQueryValue($tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// default format to json
|
// default format to json
|
||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
|
|
||||||
// this endpoint requires OAuth (access token)
|
// this endpoint requires OAuth (access token)
|
||||||
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
||||||
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
||||||
@ -480,13 +444,13 @@ class PetApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation getPetById
|
* Operation getPetById
|
||||||
*
|
*
|
||||||
* Find pet by ID.
|
* Find pet by ID
|
||||||
*
|
*
|
||||||
* @param int $pet_id ID of pet to return (required)
|
* @param int $pet_id ID of pet to return (required)
|
||||||
*
|
|
||||||
* @return \Swagger\Client\Model\Pet
|
* @return \Swagger\Client\Model\Pet
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -496,25 +460,21 @@ class PetApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation getPetByIdWithHttpInfo
|
* Operation getPetByIdWithHttpInfo
|
||||||
*
|
*
|
||||||
* Find pet by ID.
|
* Find pet by ID
|
||||||
*
|
*
|
||||||
* @param int $pet_id ID of pet to return (required)
|
* @param int $pet_id ID of pet to return (required)
|
||||||
*
|
|
||||||
* @return Array of \Swagger\Client\Model\Pet, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of \Swagger\Client\Model\Pet, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function getPetByIdWithHttpInfo($pet_id)
|
public function getPetByIdWithHttpInfo($pet_id)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'pet_id' is set
|
// verify the required parameter 'pet_id' is set
|
||||||
if ($pet_id === null) {
|
if ($pet_id === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $pet_id when calling getPetById');
|
throw new \InvalidArgumentException('Missing the required parameter $pet_id when calling getPetById');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/pet/{petId}";
|
$resourcePath = "/pet/{petId}";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -527,8 +487,6 @@ class PetApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// path params
|
// path params
|
||||||
if ($pet_id !== null) {
|
if ($pet_id !== null) {
|
||||||
$resourcePath = str_replace(
|
$resourcePath = str_replace(
|
||||||
@ -541,21 +499,17 @@ class PetApi
|
|||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
|
|
||||||
// this endpoint requires API key authentication
|
// this endpoint requires API key authentication
|
||||||
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
|
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
|
||||||
if (strlen($apiKey) !== 0) {
|
if (strlen($apiKey) !== 0) {
|
||||||
$headerParams['api_key'] = $apiKey;
|
$headerParams['api_key'] = $apiKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
@ -579,13 +533,13 @@ class PetApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation updatePet
|
* Operation updatePet
|
||||||
*
|
*
|
||||||
* Update an existing pet.
|
* Update an existing pet
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -595,25 +549,21 @@ class PetApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation updatePetWithHttpInfo
|
* Operation updatePetWithHttpInfo
|
||||||
*
|
*
|
||||||
* Update an existing pet.
|
* Update an existing pet
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
||||||
*
|
|
||||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function updatePetWithHttpInfo($body)
|
public function updatePetWithHttpInfo($body)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'body' is set
|
||||||
if ($body === null) {
|
if ($body === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling updatePet');
|
throw new \InvalidArgumentException('Missing the required parameter $body when calling updatePet');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/pet";
|
$resourcePath = "/pet";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -626,13 +576,9 @@ class PetApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/xml'));
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/xml'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// default format to json
|
// default format to json
|
||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
// body params
|
// body params
|
||||||
$_tempBody = null;
|
$_tempBody = null;
|
||||||
if (isset($body)) {
|
if (isset($body)) {
|
||||||
@ -645,7 +591,6 @@ class PetApi
|
|||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
|
|
||||||
// this endpoint requires OAuth (access token)
|
// this endpoint requires OAuth (access token)
|
||||||
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
||||||
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
||||||
@ -668,15 +613,15 @@ class PetApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation updatePetWithForm
|
* Operation updatePetWithForm
|
||||||
*
|
*
|
||||||
* Updates a pet in the store with form data.
|
* Updates a pet in the store with form data
|
||||||
*
|
*
|
||||||
* @param int $pet_id ID of pet that needs to be updated (required)
|
* @param int $pet_id ID of pet that needs to be updated (required)
|
||||||
* @param string $name Updated name of the pet (optional)
|
* @param string $name Updated name of the pet (optional)
|
||||||
* @param string $status Updated status of the pet (optional)
|
* @param string $status Updated status of the pet (optional)
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -686,27 +631,23 @@ class PetApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation updatePetWithFormWithHttpInfo
|
* Operation updatePetWithFormWithHttpInfo
|
||||||
*
|
*
|
||||||
* Updates a pet in the store with form data.
|
* Updates a pet in the store with form data
|
||||||
*
|
*
|
||||||
* @param int $pet_id ID of pet that needs to be updated (required)
|
* @param int $pet_id ID of pet that needs to be updated (required)
|
||||||
* @param string $name Updated name of the pet (optional)
|
* @param string $name Updated name of the pet (optional)
|
||||||
* @param string $status Updated status of the pet (optional)
|
* @param string $status Updated status of the pet (optional)
|
||||||
*
|
|
||||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function updatePetWithFormWithHttpInfo($pet_id, $name = null, $status = null)
|
public function updatePetWithFormWithHttpInfo($pet_id, $name = null, $status = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'pet_id' is set
|
// verify the required parameter 'pet_id' is set
|
||||||
if ($pet_id === null) {
|
if ($pet_id === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $pet_id when calling updatePetWithForm');
|
throw new \InvalidArgumentException('Missing the required parameter $pet_id when calling updatePetWithForm');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/pet/{petId}";
|
$resourcePath = "/pet/{petId}";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -719,8 +660,6 @@ class PetApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/x-www-form-urlencoded'));
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/x-www-form-urlencoded'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// path params
|
// path params
|
||||||
if ($pet_id !== null) {
|
if ($pet_id !== null) {
|
||||||
$resourcePath = str_replace(
|
$resourcePath = str_replace(
|
||||||
@ -735,19 +674,18 @@ class PetApi
|
|||||||
// form params
|
// form params
|
||||||
if ($name !== null) {
|
if ($name !== null) {
|
||||||
$formParams['name'] = $this->apiClient->getSerializer()->toFormValue($name);
|
$formParams['name'] = $this->apiClient->getSerializer()->toFormValue($name);
|
||||||
}// form params
|
}
|
||||||
|
// form params
|
||||||
if ($status !== null) {
|
if ($status !== null) {
|
||||||
$formParams['status'] = $this->apiClient->getSerializer()->toFormValue($status);
|
$formParams['status'] = $this->apiClient->getSerializer()->toFormValue($status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
|
|
||||||
// this endpoint requires OAuth (access token)
|
// this endpoint requires OAuth (access token)
|
||||||
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
||||||
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
||||||
@ -770,15 +708,15 @@ class PetApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation uploadFile
|
* Operation uploadFile
|
||||||
*
|
*
|
||||||
* uploads an image.
|
* uploads an image
|
||||||
*
|
*
|
||||||
* @param int $pet_id ID of pet to update (required)
|
* @param int $pet_id ID of pet to update (required)
|
||||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||||
* @param \SplFileObject $file file to upload (optional)
|
* @param \SplFileObject $file file to upload (optional)
|
||||||
*
|
|
||||||
* @return \Swagger\Client\Model\ApiResponse
|
* @return \Swagger\Client\Model\ApiResponse
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -788,27 +726,23 @@ class PetApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation uploadFileWithHttpInfo
|
* Operation uploadFileWithHttpInfo
|
||||||
*
|
*
|
||||||
* uploads an image.
|
* uploads an image
|
||||||
*
|
*
|
||||||
* @param int $pet_id ID of pet to update (required)
|
* @param int $pet_id ID of pet to update (required)
|
||||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||||
* @param \SplFileObject $file file to upload (optional)
|
* @param \SplFileObject $file file to upload (optional)
|
||||||
*
|
|
||||||
* @return Array of \Swagger\Client\Model\ApiResponse, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of \Swagger\Client\Model\ApiResponse, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function uploadFileWithHttpInfo($pet_id, $additional_metadata = null, $file = null)
|
public function uploadFileWithHttpInfo($pet_id, $additional_metadata = null, $file = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'pet_id' is set
|
// verify the required parameter 'pet_id' is set
|
||||||
if ($pet_id === null) {
|
if ($pet_id === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $pet_id when calling uploadFile');
|
throw new \InvalidArgumentException('Missing the required parameter $pet_id when calling uploadFile');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/pet/{petId}/uploadImage";
|
$resourcePath = "/pet/{petId}/uploadImage";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -821,8 +755,6 @@ class PetApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('multipart/form-data'));
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('multipart/form-data'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// path params
|
// path params
|
||||||
if ($pet_id !== null) {
|
if ($pet_id !== null) {
|
||||||
$resourcePath = str_replace(
|
$resourcePath = str_replace(
|
||||||
@ -837,7 +769,8 @@ class PetApi
|
|||||||
// form params
|
// form params
|
||||||
if ($additional_metadata !== null) {
|
if ($additional_metadata !== null) {
|
||||||
$formParams['additionalMetadata'] = $this->apiClient->getSerializer()->toFormValue($additional_metadata);
|
$formParams['additionalMetadata'] = $this->apiClient->getSerializer()->toFormValue($additional_metadata);
|
||||||
}// form params
|
}
|
||||||
|
// form params
|
||||||
if ($file !== null) {
|
if ($file !== null) {
|
||||||
// PHP 5.5 introduced a CurlFile object that deprecates the old @filename syntax
|
// PHP 5.5 introduced a CurlFile object that deprecates the old @filename syntax
|
||||||
// See: https://wiki.php.net/rfc/curl-file-upload
|
// See: https://wiki.php.net/rfc/curl-file-upload
|
||||||
@ -848,14 +781,12 @@ class PetApi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
|
|
||||||
// this endpoint requires OAuth (access token)
|
// this endpoint requires OAuth (access token)
|
||||||
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
|
||||||
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
|
||||||
@ -883,4 +814,5 @@ class PetApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -73,7 +73,7 @@ class StoreApi
|
|||||||
{
|
{
|
||||||
if ($apiClient == null) {
|
if ($apiClient == null) {
|
||||||
$apiClient = new ApiClient();
|
$apiClient = new ApiClient();
|
||||||
$apiClient->getConfig()->setHost('http://petstore.swagger.io/v2');
|
$apiClient->getConfig()->setHost('https://petstore.swagger.io */ =end/v2 */ =end');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->apiClient = $apiClient;
|
$this->apiClient = $apiClient;
|
||||||
@ -105,10 +105,9 @@ class StoreApi
|
|||||||
/**
|
/**
|
||||||
* Operation deleteOrder
|
* Operation deleteOrder
|
||||||
*
|
*
|
||||||
* Delete purchase order by ID.
|
* Delete purchase order by ID
|
||||||
*
|
*
|
||||||
* @param string $order_id ID of the order that needs to be deleted (required)
|
* @param string $order_id ID of the order that needs to be deleted (required)
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -118,20 +117,17 @@ class StoreApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation deleteOrderWithHttpInfo
|
* Operation deleteOrderWithHttpInfo
|
||||||
*
|
*
|
||||||
* Delete purchase order by ID.
|
* Delete purchase order by ID
|
||||||
*
|
*
|
||||||
* @param string $order_id ID of the order that needs to be deleted (required)
|
* @param string $order_id ID of the order that needs to be deleted (required)
|
||||||
*
|
|
||||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function deleteOrderWithHttpInfo($order_id)
|
public function deleteOrderWithHttpInfo($order_id)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'order_id' is set
|
// verify the required parameter 'order_id' is set
|
||||||
if ($order_id === null) {
|
if ($order_id === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $order_id when calling deleteOrder');
|
throw new \InvalidArgumentException('Missing the required parameter $order_id when calling deleteOrder');
|
||||||
@ -140,7 +136,6 @@ class StoreApi
|
|||||||
throw new \InvalidArgumentException('invalid value for "$order_id" when calling StoreApi.deleteOrder, must be bigger than or equal to 1.0.');
|
throw new \InvalidArgumentException('invalid value for "$order_id" when calling StoreApi.deleteOrder, must be bigger than or equal to 1.0.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/store/order/{orderId}";
|
$resourcePath = "/store/order/{orderId}";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -153,8 +148,6 @@ class StoreApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// path params
|
// path params
|
||||||
if ($order_id !== null) {
|
if ($order_id !== null) {
|
||||||
$resourcePath = str_replace(
|
$resourcePath = str_replace(
|
||||||
@ -167,15 +160,13 @@ class StoreApi
|
|||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath,
|
$resourcePath,
|
||||||
@ -193,11 +184,11 @@ class StoreApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation getInventory
|
* Operation getInventory
|
||||||
*
|
*
|
||||||
* Returns pet inventories by status.
|
* Returns pet inventories by status
|
||||||
*
|
|
||||||
*
|
*
|
||||||
* @return map[string,int]
|
* @return map[string,int]
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
@ -208,19 +199,16 @@ class StoreApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation getInventoryWithHttpInfo
|
* Operation getInventoryWithHttpInfo
|
||||||
*
|
*
|
||||||
* Returns pet inventories by status.
|
* Returns pet inventories by status
|
||||||
*
|
|
||||||
*
|
*
|
||||||
* @return Array of map[string,int], HTTP status code, HTTP response headers (array of strings)
|
* @return Array of map[string,int], HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function getInventoryWithHttpInfo()
|
public function getInventoryWithHttpInfo()
|
||||||
{
|
{
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/store/inventory";
|
$resourcePath = "/store/inventory";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -233,28 +221,21 @@ class StoreApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// default format to json
|
// default format to json
|
||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
|
|
||||||
// this endpoint requires API key authentication
|
// this endpoint requires API key authentication
|
||||||
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
|
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
|
||||||
if (strlen($apiKey) !== 0) {
|
if (strlen($apiKey) !== 0) {
|
||||||
$headerParams['api_key'] = $apiKey;
|
$headerParams['api_key'] = $apiKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
@ -278,13 +259,13 @@ class StoreApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation getOrderById
|
* Operation getOrderById
|
||||||
*
|
*
|
||||||
* Find purchase order by ID.
|
* Find purchase order by ID
|
||||||
*
|
*
|
||||||
* @param int $order_id ID of pet that needs to be fetched (required)
|
* @param int $order_id ID of pet that needs to be fetched (required)
|
||||||
*
|
|
||||||
* @return \Swagger\Client\Model\Order
|
* @return \Swagger\Client\Model\Order
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -294,20 +275,17 @@ class StoreApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation getOrderByIdWithHttpInfo
|
* Operation getOrderByIdWithHttpInfo
|
||||||
*
|
*
|
||||||
* Find purchase order by ID.
|
* Find purchase order by ID
|
||||||
*
|
*
|
||||||
* @param int $order_id ID of pet that needs to be fetched (required)
|
* @param int $order_id ID of pet that needs to be fetched (required)
|
||||||
*
|
|
||||||
* @return Array of \Swagger\Client\Model\Order, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of \Swagger\Client\Model\Order, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function getOrderByIdWithHttpInfo($order_id)
|
public function getOrderByIdWithHttpInfo($order_id)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'order_id' is set
|
// verify the required parameter 'order_id' is set
|
||||||
if ($order_id === null) {
|
if ($order_id === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $order_id when calling getOrderById');
|
throw new \InvalidArgumentException('Missing the required parameter $order_id when calling getOrderById');
|
||||||
@ -319,7 +297,6 @@ class StoreApi
|
|||||||
throw new \InvalidArgumentException('invalid value for "$order_id" when calling StoreApi.getOrderById, must be bigger than or equal to 1.0.');
|
throw new \InvalidArgumentException('invalid value for "$order_id" when calling StoreApi.getOrderById, must be bigger than or equal to 1.0.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/store/order/{orderId}";
|
$resourcePath = "/store/order/{orderId}";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -332,8 +309,6 @@ class StoreApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// path params
|
// path params
|
||||||
if ($order_id !== null) {
|
if ($order_id !== null) {
|
||||||
$resourcePath = str_replace(
|
$resourcePath = str_replace(
|
||||||
@ -346,15 +321,13 @@ class StoreApi
|
|||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath,
|
$resourcePath,
|
||||||
@ -377,13 +350,13 @@ class StoreApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation placeOrder
|
* Operation placeOrder
|
||||||
*
|
*
|
||||||
* Place an order for a pet.
|
* Place an order for a pet
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\Order $body order placed for purchasing the pet (required)
|
* @param \Swagger\Client\Model\Order $body order placed for purchasing the pet (required)
|
||||||
*
|
|
||||||
* @return \Swagger\Client\Model\Order
|
* @return \Swagger\Client\Model\Order
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -393,25 +366,21 @@ class StoreApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation placeOrderWithHttpInfo
|
* Operation placeOrderWithHttpInfo
|
||||||
*
|
*
|
||||||
* Place an order for a pet.
|
* Place an order for a pet
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\Order $body order placed for purchasing the pet (required)
|
* @param \Swagger\Client\Model\Order $body order placed for purchasing the pet (required)
|
||||||
*
|
|
||||||
* @return Array of \Swagger\Client\Model\Order, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of \Swagger\Client\Model\Order, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function placeOrderWithHttpInfo($body)
|
public function placeOrderWithHttpInfo($body)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'body' is set
|
||||||
if ($body === null) {
|
if ($body === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling placeOrder');
|
throw new \InvalidArgumentException('Missing the required parameter $body when calling placeOrder');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/store/order";
|
$resourcePath = "/store/order";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -424,13 +393,9 @@ class StoreApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// default format to json
|
// default format to json
|
||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
// body params
|
// body params
|
||||||
$_tempBody = null;
|
$_tempBody = null;
|
||||||
if (isset($body)) {
|
if (isset($body)) {
|
||||||
@ -443,7 +408,7 @@ class StoreApi
|
|||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath,
|
$resourcePath,
|
||||||
@ -466,4 +431,5 @@ class StoreApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -73,7 +73,7 @@ class UserApi
|
|||||||
{
|
{
|
||||||
if ($apiClient == null) {
|
if ($apiClient == null) {
|
||||||
$apiClient = new ApiClient();
|
$apiClient = new ApiClient();
|
||||||
$apiClient->getConfig()->setHost('http://petstore.swagger.io/v2');
|
$apiClient->getConfig()->setHost('https://petstore.swagger.io */ =end/v2 */ =end');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->apiClient = $apiClient;
|
$this->apiClient = $apiClient;
|
||||||
@ -105,10 +105,9 @@ class UserApi
|
|||||||
/**
|
/**
|
||||||
* Operation createUser
|
* Operation createUser
|
||||||
*
|
*
|
||||||
* Create user.
|
* Create user
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\User $body Created user object (required)
|
* @param \Swagger\Client\Model\User $body Created user object (required)
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -118,25 +117,21 @@ class UserApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation createUserWithHttpInfo
|
* Operation createUserWithHttpInfo
|
||||||
*
|
*
|
||||||
* Create user.
|
* Create user
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\User $body Created user object (required)
|
* @param \Swagger\Client\Model\User $body Created user object (required)
|
||||||
*
|
|
||||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function createUserWithHttpInfo($body)
|
public function createUserWithHttpInfo($body)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'body' is set
|
||||||
if ($body === null) {
|
if ($body === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling createUser');
|
throw new \InvalidArgumentException('Missing the required parameter $body when calling createUser');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/user";
|
$resourcePath = "/user";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -149,13 +144,9 @@ class UserApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// default format to json
|
// default format to json
|
||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
// body params
|
// body params
|
||||||
$_tempBody = null;
|
$_tempBody = null;
|
||||||
if (isset($body)) {
|
if (isset($body)) {
|
||||||
@ -168,7 +159,7 @@ class UserApi
|
|||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath,
|
$resourcePath,
|
||||||
@ -186,13 +177,13 @@ class UserApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation createUsersWithArrayInput
|
* Operation createUsersWithArrayInput
|
||||||
*
|
*
|
||||||
* Creates list of users with given input array.
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -202,25 +193,21 @@ class UserApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation createUsersWithArrayInputWithHttpInfo
|
* Operation createUsersWithArrayInputWithHttpInfo
|
||||||
*
|
*
|
||||||
* Creates list of users with given input array.
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
||||||
*
|
|
||||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function createUsersWithArrayInputWithHttpInfo($body)
|
public function createUsersWithArrayInputWithHttpInfo($body)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'body' is set
|
||||||
if ($body === null) {
|
if ($body === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling createUsersWithArrayInput');
|
throw new \InvalidArgumentException('Missing the required parameter $body when calling createUsersWithArrayInput');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/user/createWithArray";
|
$resourcePath = "/user/createWithArray";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -233,13 +220,9 @@ class UserApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// default format to json
|
// default format to json
|
||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
// body params
|
// body params
|
||||||
$_tempBody = null;
|
$_tempBody = null;
|
||||||
if (isset($body)) {
|
if (isset($body)) {
|
||||||
@ -252,7 +235,7 @@ class UserApi
|
|||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath,
|
$resourcePath,
|
||||||
@ -270,13 +253,13 @@ class UserApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation createUsersWithListInput
|
* Operation createUsersWithListInput
|
||||||
*
|
*
|
||||||
* Creates list of users with given input array.
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -286,25 +269,21 @@ class UserApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation createUsersWithListInputWithHttpInfo
|
* Operation createUsersWithListInputWithHttpInfo
|
||||||
*
|
*
|
||||||
* Creates list of users with given input array.
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
||||||
*
|
|
||||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function createUsersWithListInputWithHttpInfo($body)
|
public function createUsersWithListInputWithHttpInfo($body)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'body' is set
|
||||||
if ($body === null) {
|
if ($body === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling createUsersWithListInput');
|
throw new \InvalidArgumentException('Missing the required parameter $body when calling createUsersWithListInput');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/user/createWithList";
|
$resourcePath = "/user/createWithList";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -317,13 +296,9 @@ class UserApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// default format to json
|
// default format to json
|
||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
// body params
|
// body params
|
||||||
$_tempBody = null;
|
$_tempBody = null;
|
||||||
if (isset($body)) {
|
if (isset($body)) {
|
||||||
@ -336,7 +311,7 @@ class UserApi
|
|||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath,
|
$resourcePath,
|
||||||
@ -354,13 +329,13 @@ class UserApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation deleteUser
|
* Operation deleteUser
|
||||||
*
|
*
|
||||||
* Delete user.
|
* Delete user
|
||||||
*
|
*
|
||||||
* @param string $username The name that needs to be deleted (required)
|
* @param string $username The name that needs to be deleted (required)
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -370,25 +345,21 @@ class UserApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation deleteUserWithHttpInfo
|
* Operation deleteUserWithHttpInfo
|
||||||
*
|
*
|
||||||
* Delete user.
|
* Delete user
|
||||||
*
|
*
|
||||||
* @param string $username The name that needs to be deleted (required)
|
* @param string $username The name that needs to be deleted (required)
|
||||||
*
|
|
||||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function deleteUserWithHttpInfo($username)
|
public function deleteUserWithHttpInfo($username)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if ($username === null) {
|
if ($username === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $username when calling deleteUser');
|
throw new \InvalidArgumentException('Missing the required parameter $username when calling deleteUser');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/user/{username}";
|
$resourcePath = "/user/{username}";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -401,8 +372,6 @@ class UserApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// path params
|
// path params
|
||||||
if ($username !== null) {
|
if ($username !== null) {
|
||||||
$resourcePath = str_replace(
|
$resourcePath = str_replace(
|
||||||
@ -415,15 +384,13 @@ class UserApi
|
|||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath,
|
$resourcePath,
|
||||||
@ -441,13 +408,13 @@ class UserApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation getUserByName
|
* Operation getUserByName
|
||||||
*
|
*
|
||||||
* Get user by user name.
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
|
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
|
||||||
*
|
|
||||||
* @return \Swagger\Client\Model\User
|
* @return \Swagger\Client\Model\User
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -457,25 +424,21 @@ class UserApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation getUserByNameWithHttpInfo
|
* Operation getUserByNameWithHttpInfo
|
||||||
*
|
*
|
||||||
* Get user by user name.
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
|
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
|
||||||
*
|
|
||||||
* @return Array of \Swagger\Client\Model\User, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of \Swagger\Client\Model\User, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function getUserByNameWithHttpInfo($username)
|
public function getUserByNameWithHttpInfo($username)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if ($username === null) {
|
if ($username === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $username when calling getUserByName');
|
throw new \InvalidArgumentException('Missing the required parameter $username when calling getUserByName');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/user/{username}";
|
$resourcePath = "/user/{username}";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -488,8 +451,6 @@ class UserApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// path params
|
// path params
|
||||||
if ($username !== null) {
|
if ($username !== null) {
|
||||||
$resourcePath = str_replace(
|
$resourcePath = str_replace(
|
||||||
@ -502,15 +463,13 @@ class UserApi
|
|||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath,
|
$resourcePath,
|
||||||
@ -533,14 +492,14 @@ class UserApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation loginUser
|
* Operation loginUser
|
||||||
*
|
*
|
||||||
* Logs user into the system.
|
* Logs user into the system
|
||||||
*
|
*
|
||||||
* @param string $username The user name for login (required)
|
* @param string $username The user name for login (required)
|
||||||
* @param string $password The password for login in clear text (required)
|
* @param string $password The password for login in clear text (required)
|
||||||
*
|
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -550,31 +509,26 @@ class UserApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation loginUserWithHttpInfo
|
* Operation loginUserWithHttpInfo
|
||||||
*
|
*
|
||||||
* Logs user into the system.
|
* Logs user into the system
|
||||||
*
|
*
|
||||||
* @param string $username The user name for login (required)
|
* @param string $username The user name for login (required)
|
||||||
* @param string $password The password for login in clear text (required)
|
* @param string $password The password for login in clear text (required)
|
||||||
*
|
|
||||||
* @return Array of string, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of string, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function loginUserWithHttpInfo($username, $password)
|
public function loginUserWithHttpInfo($username, $password)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if ($username === null) {
|
if ($username === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $username when calling loginUser');
|
throw new \InvalidArgumentException('Missing the required parameter $username when calling loginUser');
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'password' is set
|
// verify the required parameter 'password' is set
|
||||||
if ($password === null) {
|
if ($password === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $password when calling loginUser');
|
throw new \InvalidArgumentException('Missing the required parameter $password when calling loginUser');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/user/login";
|
$resourcePath = "/user/login";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -590,25 +544,22 @@ class UserApi
|
|||||||
// query params
|
// query params
|
||||||
if ($username !== null) {
|
if ($username !== null) {
|
||||||
$queryParams['username'] = $this->apiClient->getSerializer()->toQueryValue($username);
|
$queryParams['username'] = $this->apiClient->getSerializer()->toQueryValue($username);
|
||||||
}// query params
|
}
|
||||||
|
// query params
|
||||||
if ($password !== null) {
|
if ($password !== null) {
|
||||||
$queryParams['password'] = $this->apiClient->getSerializer()->toQueryValue($password);
|
$queryParams['password'] = $this->apiClient->getSerializer()->toQueryValue($password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// default format to json
|
// default format to json
|
||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath,
|
$resourcePath,
|
||||||
@ -631,11 +582,11 @@ class UserApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation logoutUser
|
* Operation logoutUser
|
||||||
*
|
*
|
||||||
* Logs out current logged in user session.
|
* Logs out current logged in user session
|
||||||
*
|
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
@ -646,19 +597,16 @@ class UserApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation logoutUserWithHttpInfo
|
* Operation logoutUserWithHttpInfo
|
||||||
*
|
*
|
||||||
* Logs out current logged in user session.
|
* Logs out current logged in user session
|
||||||
*
|
|
||||||
*
|
*
|
||||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function logoutUserWithHttpInfo()
|
public function logoutUserWithHttpInfo()
|
||||||
{
|
{
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/user/logout";
|
$resourcePath = "/user/logout";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -671,22 +619,17 @@ class UserApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// default format to json
|
// default format to json
|
||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($_tempBody)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath,
|
$resourcePath,
|
||||||
@ -704,14 +647,14 @@ class UserApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation updateUser
|
* Operation updateUser
|
||||||
*
|
*
|
||||||
* Updated user.
|
* Updated user
|
||||||
*
|
*
|
||||||
* @param string $username name that need to be deleted (required)
|
* @param string $username name that need to be deleted (required)
|
||||||
* @param \Swagger\Client\Model\User $body Updated user object (required)
|
* @param \Swagger\Client\Model\User $body Updated user object (required)
|
||||||
*
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
@ -721,31 +664,26 @@ class UserApi
|
|||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Operation updateUserWithHttpInfo
|
* Operation updateUserWithHttpInfo
|
||||||
*
|
*
|
||||||
* Updated user.
|
* Updated user
|
||||||
*
|
*
|
||||||
* @param string $username name that need to be deleted (required)
|
* @param string $username name that need to be deleted (required)
|
||||||
* @param \Swagger\Client\Model\User $body Updated user object (required)
|
* @param \Swagger\Client\Model\User $body Updated user object (required)
|
||||||
*
|
|
||||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||||
*/
|
*/
|
||||||
public function updateUserWithHttpInfo($username, $body)
|
public function updateUserWithHttpInfo($username, $body)
|
||||||
{
|
{
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if ($username === null) {
|
if ($username === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $username when calling updateUser');
|
throw new \InvalidArgumentException('Missing the required parameter $username when calling updateUser');
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'body' is set
|
||||||
if ($body === null) {
|
if ($body === null) {
|
||||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling updateUser');
|
throw new \InvalidArgumentException('Missing the required parameter $body when calling updateUser');
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse inputs
|
// parse inputs
|
||||||
$resourcePath = "/user/{username}";
|
$resourcePath = "/user/{username}";
|
||||||
$httpBody = '';
|
$httpBody = '';
|
||||||
@ -758,8 +696,6 @@ class UserApi
|
|||||||
}
|
}
|
||||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// path params
|
// path params
|
||||||
if ($username !== null) {
|
if ($username !== null) {
|
||||||
$resourcePath = str_replace(
|
$resourcePath = str_replace(
|
||||||
@ -771,7 +707,6 @@ class UserApi
|
|||||||
// default format to json
|
// default format to json
|
||||||
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
$resourcePath = str_replace("{format}", "json", $resourcePath);
|
||||||
|
|
||||||
|
|
||||||
// body params
|
// body params
|
||||||
$_tempBody = null;
|
$_tempBody = null;
|
||||||
if (isset($body)) {
|
if (isset($body)) {
|
||||||
@ -784,7 +719,7 @@ class UserApi
|
|||||||
} elseif (count($formParams) > 0) {
|
} elseif (count($formParams) > 0) {
|
||||||
$httpBody = $formParams; // for HTTP post (form)
|
$httpBody = $formParams; // for HTTP post (form)
|
||||||
}
|
}
|
||||||
// make the API Call
|
// make the API Call
|
||||||
try {
|
try {
|
||||||
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
|
||||||
$resourcePath,
|
$resourcePath,
|
||||||
@ -802,4 +737,5 @@ class UserApi
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -102,7 +102,7 @@ class Configuration
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $host = 'http://petstore.swagger.io/v2';
|
protected $host = 'https://petstore.swagger.io */ =end/v2 */ =end';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Timeout (second) of the HTTP request, by default set to 0, no timeout
|
* Timeout (second) of the HTTP request, by default set to 0, no timeout
|
||||||
@ -522,7 +522,7 @@ class Configuration
|
|||||||
$report = 'PHP SDK (Swagger\Client) Debug Report:' . PHP_EOL;
|
$report = 'PHP SDK (Swagger\Client) Debug Report:' . PHP_EOL;
|
||||||
$report .= ' OS: ' . php_uname() . PHP_EOL;
|
$report .= ' OS: ' . php_uname() . PHP_EOL;
|
||||||
$report .= ' PHP Version: ' . phpversion() . PHP_EOL;
|
$report .= ' PHP Version: ' . phpversion() . PHP_EOL;
|
||||||
$report .= ' OpenAPI Spec Version: 1.0.0' . PHP_EOL;
|
$report .= ' OpenAPI Spec Version: 1.0.0 =end' . PHP_EOL;
|
||||||
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
|
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
|
||||||
|
|
||||||
return $report;
|
return $report;
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AdditionalPropertiesClass Class Doc Comment
|
* AdditionalPropertiesClass Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Animal Class Doc Comment
|
* Animal Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AnimalFarm Class Doc Comment
|
* AnimalFarm Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ApiResponse Class Doc Comment
|
* ApiResponse Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ArrayOfArrayOfNumberOnly Class Doc Comment
|
* ArrayOfArrayOfNumberOnly Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ArrayOfNumberOnly Class Doc Comment
|
* ArrayOfNumberOnly Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ArrayTest Class Doc Comment
|
* ArrayTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cat Class Doc Comment
|
* Cat Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Category Class Doc Comment
|
* Category Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dog Class Doc Comment
|
* Dog Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EnumClass Class Doc Comment
|
* EnumClass Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EnumTest Class Doc Comment
|
* EnumTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FormatTest Class Doc Comment
|
* FormatTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HasOnlyReadOnly Class Doc Comment
|
* HasOnlyReadOnly Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MapTest Class Doc Comment
|
* MapTest Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MixedPropertiesAndAdditionalPropertiesClass Class Doc Comment
|
* MixedPropertiesAndAdditionalPropertiesClass Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,13 +43,12 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model200Response Class Doc Comment
|
* Model200Response Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
* @description Model for testing model name starting with number
|
// @description Model for testing model name starting with number
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,13 +43,12 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ModelReturn Class Doc Comment
|
* ModelReturn Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
* @description Model for testing reserved words
|
// @description Model for testing reserved words
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,13 +43,12 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name Class Doc Comment
|
* Name Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
* @description Model for testing model name same as property name
|
// @description Model for testing model name same as property name
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NumberOnly Class Doc Comment
|
* NumberOnly Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order Class Doc Comment
|
* Order Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Pet Class Doc Comment
|
* Pet Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ReadOnlyFirst Class Doc Comment
|
* ReadOnlyFirst Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SpecialModelName Class Doc Comment
|
* SpecialModelName Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tag Class Doc Comment
|
* Tag Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@ -43,12 +43,11 @@ namespace Swagger\Client\Model;
|
|||||||
|
|
||||||
use \ArrayAccess;
|
use \ArrayAccess;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User Class Doc Comment
|
* User Class Doc Comment
|
||||||
*
|
*
|
||||||
* @category Class
|
* @category Class */
|
||||||
|
/**
|
||||||
* @package Swagger\Client
|
* @package Swagger\Client
|
||||||
* @author http://github.com/swagger-api/swagger-codegen
|
* @author http://github.com/swagger-api/swagger-codegen
|
||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
|
@ -12,12 +12,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger Petstore
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
*
|
*
|
||||||
* OpenAPI spec version: 1.0.0
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
* Contact: apiteam@swagger.io
|
* Contact: apiteam@swagger.io =end
|
||||||
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@ -9,20 +9,27 @@
|
|||||||
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache Licene v2
|
||||||
* @link https://github.com/swagger-api/swagger-codegen
|
* @link https://github.com/swagger-api/swagger-codegen
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright 2016 SmartBear Software
|
* Swagger Petstore =end
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ =end
|
||||||
* you may not use this file except in compliance with the License.
|
*
|
||||||
* You may obtain a copy of the License at
|
* OpenAPI spec version: 1.0.0 =end
|
||||||
|
* Contact: apiteam@swagger.io =end
|
||||||
|
* Generated by: https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
*
|
*
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
*
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -31,7 +38,7 @@
|
|||||||
* Please update the test case below to test the endpoint.
|
* Please update the test case below to test the endpoint.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Swagger\Client\Api;
|
namespace Swagger\Client;
|
||||||
|
|
||||||
use \Swagger\Client\Configuration;
|
use \Swagger\Client\Configuration;
|
||||||
use \Swagger\Client\ApiClient;
|
use \Swagger\Client\ApiClient;
|
||||||
@ -51,16 +58,32 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup before running each test case
|
* Setup before running any test cases
|
||||||
*/
|
*/
|
||||||
public static function setUpBeforeClass()
|
public static function setUpBeforeClass()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup before running each test case
|
||||||
|
*/
|
||||||
|
public function setUp()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clean up after running each test case
|
* Clean up after running each test case
|
||||||
*/
|
*/
|
||||||
|
public function tearDown()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clean up after running all test cases
|
||||||
|
*/
|
||||||
public static function tearDownAfterClass()
|
public static function tearDownAfterClass()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -69,11 +92,23 @@ class FakeApiTest extends \PHPUnit_Framework_TestCase
|
|||||||
/**
|
/**
|
||||||
* Test case for testEndpointParameters
|
* Test case for testEndpointParameters
|
||||||
*
|
*
|
||||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 .
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function testTestEndpointParameters()
|
public function testTestEndpointParameters()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test case for testEnumQueryParameters
|
||||||
|
*
|
||||||
|
* To test enum query parameters.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public function testTestEnumQueryParameters()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user