Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OneOf nested inside a AllOf not supported #63

Open
georgeboot opened this issue Nov 29, 2023 · 0 comments
Open

OneOf nested inside a AllOf not supported #63

georgeboot opened this issue Nov 29, 2023 · 0 comments

Comments

@georgeboot
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant