Add example allOf with single ref (#10948)

* Add example allOf with single ref

* fix dart-dio-next handling of that case

* Refactor without vendor extension

* Regenerate newer samples
This commit is contained in:
Peter Leibiger
2022-04-12 07:52:53 +02:00
committed by GitHub
parent b29b5e1045
commit 15e9d4ed8c
130 changed files with 2273 additions and 55 deletions

View File

@@ -66,7 +66,8 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable
'email' => 'string',
'password' => 'string',
'phone' => 'string',
'user_status' => 'int'
'user_status' => 'int',
'user_type' => 'UserType'
];
/**
@@ -84,7 +85,8 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable
'email' => null,
'password' => null,
'phone' => null,
'user_status' => 'int32'
'user_status' => 'int32',
'user_type' => null
];
/**
@@ -121,7 +123,8 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable
'email' => 'email',
'password' => 'password',
'phone' => 'phone',
'user_status' => 'userStatus'
'user_status' => 'userStatus',
'user_type' => 'userType'
];
/**
@@ -137,7 +140,8 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable
'email' => 'setEmail',
'password' => 'setPassword',
'phone' => 'setPhone',
'user_status' => 'setUserStatus'
'user_status' => 'setUserStatus',
'user_type' => 'setUserType'
];
/**
@@ -153,7 +157,8 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable
'email' => 'getEmail',
'password' => 'getPassword',
'phone' => 'getPhone',
'user_status' => 'getUserStatus'
'user_status' => 'getUserStatus',
'user_type' => 'getUserType'
];
/**
@@ -221,6 +226,7 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable
$this->container['password'] = $data['password'] ?? null;
$this->container['phone'] = $data['phone'] ?? null;
$this->container['user_status'] = $data['user_status'] ?? null;
$this->container['user_type'] = $data['user_type'] ?? null;
}
/**
@@ -438,6 +444,30 @@ class User implements ModelInterface, ArrayAccess, \JsonSerializable
return $this;
}
/**
* Gets user_type
*
* @return UserType|null
*/
public function getUserType()
{
return $this->container['user_type'];
}
/**
* Sets user_type
*
* @param UserType|null $user_type user_type
*
* @return self
*/
public function setUserType($user_type)
{
$this->container['user_type'] = $user_type;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*

View File

@@ -0,0 +1,62 @@
<?php
/**
* UserType
*
* PHP version 7.3
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OpenAPI Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 6.0.0-SNAPSHOT
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OpenAPI\Client\Model;
use \OpenAPI\Client\ObjectSerializer;
/**
* UserType Class Doc Comment
*
* @category Class
* @package OpenAPI\Client
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class UserType
{
/**
* Possible values of this enum
*/
const ADMIN = 'admin';
const USER = 'user';
/**
* Gets allowable values of the enum
* @return string[]
*/
public static function getAllowableEnumValues()
{
return [
self::ADMIN,
self::USER
];
}
}