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