+
Skip to content

OneOf nested inside a AllOf not supported #63

@georgeboot

Description

@georgeboot

I have a generic schema that applies to every response (GenericResponseSchema). I also have a couple of specific response types (FirstSpecificResponseSchema and SecondSpecificResponseSchema).

I want to do the following:

return Response::ok()->description('Successful response')->content(
    MediaType::create()->mediaType('application/geo+json')->schema(
        AllOf::create()->schemas(
            GenericResponseSchema::ref(),
            OneOf::create()->schemas(
                FirstSpecificResponseSchema::ref(),
                SecondSpecificResponseSchema::ref(),
            )
        )
    )
);

But this does not work, because AllOf::schemas() only takes Schema, not OneOf.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载