update samples

This commit is contained in:
William Cheng
2020-01-10 21:51:59 +08:00
parent cbc12543a9
commit 20c7400d56
4 changed files with 335 additions and 0 deletions

View File

@@ -0,0 +1,63 @@
<?php
/**
* InlineObject
*
* PHP version 7.1
*
* @package OpenAPIServer\Model
* @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator
*/
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
*/
namespace OpenAPIServer\Model;
use OpenAPIServer\Interfaces\ModelInterface;
/**
* InlineObject
*
* @package OpenAPIServer\Model
* @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator
*/
class InlineObject implements ModelInterface
{
private const MODEL_SCHEMA = <<<'SCHEMA'
{
"type" : "object",
"properties" : {
"name" : {
"type" : "string",
"description" : "Updated name of the pet"
},
"status" : {
"type" : "string",
"description" : "Updated status of the pet"
}
}
}
SCHEMA;
/** @var string $name Updated name of the pet*/
private $name;
/** @var string $status Updated status of the pet*/
private $status;
/**
* Returns model schema.
*
* @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE.
*
* @return array
*/
public static function getOpenApiSchema($assoc = false)
{
return json_decode(static::MODEL_SCHEMA, $assoc);
}
}

View File

@@ -0,0 +1,64 @@
<?php
/**
* InlineObject1
*
* PHP version 7.1
*
* @package OpenAPIServer\Model
* @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator
*/
/**
* NOTE: This class is auto generated by the openapi generator program.
* https://github.com/openapitools/openapi-generator
*/
namespace OpenAPIServer\Model;
use OpenAPIServer\Interfaces\ModelInterface;
/**
* InlineObject1
*
* @package OpenAPIServer\Model
* @author OpenAPI Generator team
* @link https://github.com/openapitools/openapi-generator
*/
class InlineObject1 implements ModelInterface
{
private const MODEL_SCHEMA = <<<'SCHEMA'
{
"type" : "object",
"properties" : {
"additionalMetadata" : {
"type" : "string",
"description" : "Additional data to pass to server"
},
"file" : {
"type" : "string",
"description" : "file to upload",
"format" : "binary"
}
}
}
SCHEMA;
/** @var string $additionalMetadata Additional data to pass to server*/
private $additionalMetadata;
/** @var \SplFileObject $file file to upload*/
private $file;
/**
* Returns model schema.
*
* @param bool $assoc When TRUE, returned objects will be converted into associative arrays. Default FALSE.
*
* @return array
*/
public static function getOpenApiSchema($assoc = false)
{
return json_decode(static::MODEL_SCHEMA, $assoc);
}
}