forked from loafle/openapi-generator-original
* Remove package from sources * Add Mocker package * Add BaseModel Beside setters and getters this class implements three methods required for mocking: getOpenApiSchema, createFromData and jsonSerialize. BaseModel keeps all data values in $dataContainer like PHP client does. I don't see other way to support scalar models(enum for instance). That's why I've removed class variables generation. * Update documentation * Update PHPUnit section in readme * Add constant with models namespace This constant will be required for data deserialization when handling refs. * Refresh samples * Add samples generation config
62 lines
1.5 KiB
PHP
62 lines
1.5 KiB
PHP
<?php
|
|
|
|
/**
|
|
* OpenAPI Petstore
|
|
* PHP version 7.2
|
|
*
|
|
* @package OpenAPIServer
|
|
* @author OpenAPI Generator team
|
|
* @link https://github.com/openapitools/openapi-generator
|
|
*/
|
|
|
|
/**
|
|
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
|
* The version of the OpenAPI document: 1.0.0
|
|
* Generated by: https://github.com/openapitools/openapi-generator.git
|
|
*/
|
|
|
|
/**
|
|
* NOTE: This class is auto generated by the openapi generator program.
|
|
* https://github.com/openapitools/openapi-generator
|
|
*/
|
|
namespace OpenAPIServer\Model;
|
|
|
|
use OpenAPIServer\BaseModel;
|
|
|
|
/**
|
|
* InlineObject1
|
|
*
|
|
* @package OpenAPIServer\Model
|
|
* @author OpenAPI Generator team
|
|
* @link https://github.com/openapitools/openapi-generator
|
|
*/
|
|
class InlineObject1 extends BaseModel
|
|
{
|
|
/**
|
|
* @var string Models namespace.
|
|
* Can be required for data deserialization when model contains referenced schemas.
|
|
*/
|
|
protected const MODELS_NAMESPACE = '\OpenAPIServer\Model';
|
|
|
|
/**
|
|
* @var string Constant with OAS schema of current class.
|
|
* Should be overwritten by inherited class.
|
|
*/
|
|
protected 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;
|
|
}
|