[BUG][PHP] Model name suffix incorrectly added to inline enum names
Created by: hinrik
Consider this definition:
components:
schemas:
Foo:
type: object
properties:
inline_enum:
type: string
enum: [one, two, three]
referenced_enum:
$ref: '#/components/schemas/ReferencedEnum'
ReferencedEnum:
type: string
enum: [one, two, three]
If you generate PHP from this defintion using a modelNameSuffix=DTO
option on the generator, the values of inline_enum
will now change from being e.g. INLINE_ENUM_ONE
to INLINE_ENUM_DTO_ONE
, which doesn't make sense.
Values of ReferencedEnum
are untouched, still ReferencedEnum::ONE
(though they are unusable regardless for another reason).