mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 03:56:09 +00:00
update samples
This commit is contained in:
63
samples/server/petstore/php-slim4/lib/Model/InlineObject.php
Normal file
63
samples/server/petstore/php-slim4/lib/Model/InlineObject.php
Normal 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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user