forked from loafle/openapi-generator-original
* fixed enum template; added enum handling to ObjectSerializer * regenerated templates * improved InvalidArgumentException message * regenerated sample client * added value check of OuterEnum during sanitization * regenerated samples
This commit is contained in:
@@ -29,8 +29,6 @@
|
||||
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* EnumClass Class Doc Comment
|
||||
*
|
||||
@@ -40,11 +38,25 @@ use \ArrayAccess;
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class EnumClass {
|
||||
/**
|
||||
* Possible values of this enum
|
||||
*/
|
||||
const ABC = '_abc';
|
||||
const EFG = '-efg';
|
||||
const XYZ = '(xyz)';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
* @return string[]
|
||||
*/
|
||||
public static function getAllowableEnumValues()
|
||||
{
|
||||
return [
|
||||
self::ABC,
|
||||
self::EFG,
|
||||
self::XYZ,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
|
||||
namespace Swagger\Client\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
|
||||
/**
|
||||
* OuterEnum Class Doc Comment
|
||||
*
|
||||
@@ -40,11 +38,25 @@ use \ArrayAccess;
|
||||
* @link https://github.com/swagger-api/swagger-codegen
|
||||
*/
|
||||
class OuterEnum {
|
||||
/**
|
||||
* Possible values of this enum
|
||||
*/
|
||||
const PLACED = 'placed';
|
||||
const APPROVED = 'approved';
|
||||
const DELIVERED = 'delivered';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
* @return string[]
|
||||
*/
|
||||
public static function getAllowableEnumValues()
|
||||
{
|
||||
return [
|
||||
self::PLACED,
|
||||
self::APPROVED,
|
||||
self::DELIVERED,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user