Skip to content

[Bug]: REF_AS_PARENT_IN_ALLOF not working for open api generation #2481

@HoffmannLuca

Description

@HoffmannLuca

Version

6.6.0

Description

im trying to inherit a parent class that has some properties but the type generation doesnt seem to work.

this is my child class

#[OA\Schema(
    description: 'Child class with parent properties',
    allOf: [
        new OA\Schema(ref: new Model(type: Parent::class)),
    ]
)]
class Child extends Parent

if i remove extends Parent then the types get generated correctly but when i use extends Parent (which i definetly want) things like enums break and become type string

JSON OpenApi

JSON OpenApi
Replace this text with your JSON (`bin/console nelmio:apidoc:dump`)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions