forked from loafle/openapi-generator-original
Update sample client
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2015 SmartBear Software
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
class Category implements ArrayAccess {
|
||||
/** @var string[] Array of property to type mappings. Used for (de)serialization */
|
||||
static $swaggerTypes = array(
|
||||
'id' => 'int',
|
||||
'name' => 'string'
|
||||
);
|
||||
|
||||
/** @var string[] Array of attributes where the key is the local name, and the value is the original name */
|
||||
static $attributeMap = array(
|
||||
'id' => 'id',
|
||||
'name' => 'name'
|
||||
);
|
||||
|
||||
/** @var int $id */
|
||||
public $id;
|
||||
|
||||
/** @var string $name */
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @param mixed[] Array of parameters to initialize the object with
|
||||
*/
|
||||
public function __construct(array $data = null) {
|
||||
$this->id = @$data["id"];
|
||||
$this->name = @$data["name"];
|
||||
}
|
||||
|
||||
public function offsetExists($offset) {
|
||||
return isset($this->$offset);
|
||||
}
|
||||
|
||||
public function offsetGet($offset) {
|
||||
return $this->$offset;
|
||||
}
|
||||
|
||||
public function offsetSet($offset, $value) {
|
||||
$this->$offset = $value;
|
||||
}
|
||||
|
||||
public function offsetUnset($offset) {
|
||||
unset($this->$offset);
|
||||
}
|
||||
|
||||
public function __toString() {
|
||||
if (defined('JSON_PRETTY_PRINT')) {
|
||||
return json_encode($this, JSON_PRETTY_PRINT);
|
||||
} else {
|
||||
return json_encode($this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2015 SmartBear Software
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
class Order implements ArrayAccess {
|
||||
/** @var string[] Array of property to type mappings. Used for (de)serialization */
|
||||
static $swaggerTypes = array(
|
||||
'id' => 'int',
|
||||
'pet_id' => 'int',
|
||||
'quantity' => 'int',
|
||||
'ship_date' => '\DateTime',
|
||||
'status' => 'string',
|
||||
'complete' => 'bool'
|
||||
);
|
||||
|
||||
/** @var string[] Array of attributes where the key is the local name, and the value is the original name */
|
||||
static $attributeMap = array(
|
||||
'id' => 'id',
|
||||
'pet_id' => 'petId',
|
||||
'quantity' => 'quantity',
|
||||
'ship_date' => 'shipDate',
|
||||
'status' => 'status',
|
||||
'complete' => 'complete'
|
||||
);
|
||||
|
||||
/** @var int $id */
|
||||
public $id;
|
||||
|
||||
/** @var int $pet_id */
|
||||
public $pet_id;
|
||||
|
||||
/** @var int $quantity */
|
||||
public $quantity;
|
||||
|
||||
/** @var \DateTime $ship_date */
|
||||
public $ship_date;
|
||||
|
||||
/** @var string $status Order Status */
|
||||
public $status;
|
||||
|
||||
/** @var bool $complete */
|
||||
public $complete;
|
||||
|
||||
/**
|
||||
* @param mixed[] Array of parameters to initialize the object with
|
||||
*/
|
||||
public function __construct(array $data = null) {
|
||||
$this->id = @$data["id"];
|
||||
$this->pet_id = @$data["pet_id"];
|
||||
$this->quantity = @$data["quantity"];
|
||||
$this->ship_date = @$data["ship_date"];
|
||||
$this->status = @$data["status"];
|
||||
$this->complete = @$data["complete"];
|
||||
}
|
||||
|
||||
public function offsetExists($offset) {
|
||||
return isset($this->$offset);
|
||||
}
|
||||
|
||||
public function offsetGet($offset) {
|
||||
return $this->$offset;
|
||||
}
|
||||
|
||||
public function offsetSet($offset, $value) {
|
||||
$this->$offset = $value;
|
||||
}
|
||||
|
||||
public function offsetUnset($offset) {
|
||||
unset($this->$offset);
|
||||
}
|
||||
|
||||
public function __toString() {
|
||||
if (defined('JSON_PRETTY_PRINT')) {
|
||||
return json_encode($this, JSON_PRETTY_PRINT);
|
||||
} else {
|
||||
return json_encode($this);
|
||||
}
|
||||
}
|
||||
}
|
||||
103
samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php
Normal file
103
samples/client/petstore/php/SwaggerClient-php/lib/Model/Pet.php
Normal file
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2015 SmartBear Software
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
class Pet implements ArrayAccess {
|
||||
/** @var string[] Array of property to type mappings. Used for (de)serialization */
|
||||
static $swaggerTypes = array(
|
||||
'id' => 'int',
|
||||
'category' => '\Swagger\Client\Model\Category',
|
||||
'name' => 'string',
|
||||
'photo_urls' => 'string[]',
|
||||
'tags' => '\Swagger\Client\Model\Tag[]',
|
||||
'status' => 'string'
|
||||
);
|
||||
|
||||
/** @var string[] Array of attributes where the key is the local name, and the value is the original name */
|
||||
static $attributeMap = array(
|
||||
'id' => 'id',
|
||||
'category' => 'category',
|
||||
'name' => 'name',
|
||||
'photo_urls' => 'photoUrls',
|
||||
'tags' => 'tags',
|
||||
'status' => 'status'
|
||||
);
|
||||
|
||||
/** @var int $id */
|
||||
public $id;
|
||||
|
||||
/** @var \Swagger\Client\Model\Category $category */
|
||||
public $category;
|
||||
|
||||
/** @var string $name */
|
||||
public $name;
|
||||
|
||||
/** @var string[] $photo_urls */
|
||||
public $photo_urls;
|
||||
|
||||
/** @var \Swagger\Client\Model\Tag[] $tags */
|
||||
public $tags;
|
||||
|
||||
/** @var string $status pet status in the store */
|
||||
public $status;
|
||||
|
||||
/**
|
||||
* @param mixed[] Array of parameters to initialize the object with
|
||||
*/
|
||||
public function __construct(array $data = null) {
|
||||
$this->id = @$data["id"];
|
||||
$this->category = @$data["category"];
|
||||
$this->name = @$data["name"];
|
||||
$this->photo_urls = @$data["photo_urls"];
|
||||
$this->tags = @$data["tags"];
|
||||
$this->status = @$data["status"];
|
||||
}
|
||||
|
||||
public function offsetExists($offset) {
|
||||
return isset($this->$offset);
|
||||
}
|
||||
|
||||
public function offsetGet($offset) {
|
||||
return $this->$offset;
|
||||
}
|
||||
|
||||
public function offsetSet($offset, $value) {
|
||||
$this->$offset = $value;
|
||||
}
|
||||
|
||||
public function offsetUnset($offset) {
|
||||
unset($this->$offset);
|
||||
}
|
||||
|
||||
public function __toString() {
|
||||
if (defined('JSON_PRETTY_PRINT')) {
|
||||
return json_encode($this, JSON_PRETTY_PRINT);
|
||||
} else {
|
||||
return json_encode($this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2015 SmartBear Software
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
class Tag implements ArrayAccess {
|
||||
/** @var string[] Array of property to type mappings. Used for (de)serialization */
|
||||
static $swaggerTypes = array(
|
||||
'id' => 'int',
|
||||
'name' => 'string'
|
||||
);
|
||||
|
||||
/** @var string[] Array of attributes where the key is the local name, and the value is the original name */
|
||||
static $attributeMap = array(
|
||||
'id' => 'id',
|
||||
'name' => 'name'
|
||||
);
|
||||
|
||||
/** @var int $id */
|
||||
public $id;
|
||||
|
||||
/** @var string $name */
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @param mixed[] Array of parameters to initialize the object with
|
||||
*/
|
||||
public function __construct(array $data = null) {
|
||||
$this->id = @$data["id"];
|
||||
$this->name = @$data["name"];
|
||||
}
|
||||
|
||||
public function offsetExists($offset) {
|
||||
return isset($this->$offset);
|
||||
}
|
||||
|
||||
public function offsetGet($offset) {
|
||||
return $this->$offset;
|
||||
}
|
||||
|
||||
public function offsetSet($offset, $value) {
|
||||
$this->$offset = $value;
|
||||
}
|
||||
|
||||
public function offsetUnset($offset) {
|
||||
unset($this->$offset);
|
||||
}
|
||||
|
||||
public function __toString() {
|
||||
if (defined('JSON_PRETTY_PRINT')) {
|
||||
return json_encode($this, JSON_PRETTY_PRINT);
|
||||
} else {
|
||||
return json_encode($this);
|
||||
}
|
||||
}
|
||||
}
|
||||
115
samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php
Normal file
115
samples/client/petstore/php/SwaggerClient-php/lib/Model/User.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2015 SmartBear Software
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
class User implements ArrayAccess {
|
||||
/** @var string[] Array of property to type mappings. Used for (de)serialization */
|
||||
static $swaggerTypes = array(
|
||||
'id' => 'int',
|
||||
'username' => 'string',
|
||||
'first_name' => 'string',
|
||||
'last_name' => 'string',
|
||||
'email' => 'string',
|
||||
'password' => 'string',
|
||||
'phone' => 'string',
|
||||
'user_status' => 'int'
|
||||
);
|
||||
|
||||
/** @var string[] Array of attributes where the key is the local name, and the value is the original name */
|
||||
static $attributeMap = array(
|
||||
'id' => 'id',
|
||||
'username' => 'username',
|
||||
'first_name' => 'firstName',
|
||||
'last_name' => 'lastName',
|
||||
'email' => 'email',
|
||||
'password' => 'password',
|
||||
'phone' => 'phone',
|
||||
'user_status' => 'userStatus'
|
||||
);
|
||||
|
||||
/** @var int $id */
|
||||
public $id;
|
||||
|
||||
/** @var string $username */
|
||||
public $username;
|
||||
|
||||
/** @var string $first_name */
|
||||
public $first_name;
|
||||
|
||||
/** @var string $last_name */
|
||||
public $last_name;
|
||||
|
||||
/** @var string $email */
|
||||
public $email;
|
||||
|
||||
/** @var string $password */
|
||||
public $password;
|
||||
|
||||
/** @var string $phone */
|
||||
public $phone;
|
||||
|
||||
/** @var int $user_status User Status */
|
||||
public $user_status;
|
||||
|
||||
/**
|
||||
* @param mixed[] Array of parameters to initialize the object with
|
||||
*/
|
||||
public function __construct(array $data = null) {
|
||||
$this->id = @$data["id"];
|
||||
$this->username = @$data["username"];
|
||||
$this->first_name = @$data["first_name"];
|
||||
$this->last_name = @$data["last_name"];
|
||||
$this->email = @$data["email"];
|
||||
$this->password = @$data["password"];
|
||||
$this->phone = @$data["phone"];
|
||||
$this->user_status = @$data["user_status"];
|
||||
}
|
||||
|
||||
public function offsetExists($offset) {
|
||||
return isset($this->$offset);
|
||||
}
|
||||
|
||||
public function offsetGet($offset) {
|
||||
return $this->$offset;
|
||||
}
|
||||
|
||||
public function offsetSet($offset, $value) {
|
||||
$this->$offset = $value;
|
||||
}
|
||||
|
||||
public function offsetUnset($offset) {
|
||||
unset($this->$offset);
|
||||
}
|
||||
|
||||
public function __toString() {
|
||||
if (defined('JSON_PRETTY_PRINT')) {
|
||||
return json_encode($this, JSON_PRETTY_PRINT);
|
||||
} else {
|
||||
return json_encode($this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user