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

Examples attribute is not repeatable #1388

Closed
jtreminio-dropbox opened this issue Jan 12, 2023 · 0 comments · Fixed by #1389
Closed

Examples attribute is not repeatable #1388

jtreminio-dropbox opened this issue Jan 12, 2023 · 0 comments · Fixed by #1389

Comments

@jtreminio-dropbox
Copy link

Similar to #1298

With annotations this is fine, both nested within an OA\MediaType object or defined at the top-level of a class.

For example, this is fine with annotations:

/**
 * @OA\Examples(example="AccountCreateRequestDefaultExample",
 *     summary="Default Example",
 *     value={
 *         "$ref": "examples/json/AccountCreateRequestDefaultExample.json",
 *     },
 * )
 * @OA\Examples(example="AccountCreateRequestOAuthExample",
 *     summary="OAuth Example",
 *     value={
 *         "$ref": "examples/json/AccountCreateRequestOAuthExample.json",
 *     },
 * )
 */

but this complains about \Attribute::IS_REPEATABLE missing:

#[OA\Examples(example: "AccountCreateRequestDefaultExample",
    summary: "Default Example",
    value: [
        '$ref' => "examples/json/AccountCreateRequestDefaultExample.json",
    ],
)]

#[OA\Examples(example: "AccountCreateRequestOAuthExample",
    summary: "OAuth Example",
    value: [
        '$ref' => "examples/json/AccountCreateRequestOAuthExample.json",
    ],
)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant