-
-
Notifications
You must be signed in to change notification settings - Fork 836
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
Duplication of query parameter if it's a reference #2314
Labels
Comments
jneidel
changed the title
Duplication of paramter if it's a reference
Duplication of query parameter if it's a reference
Jul 16, 2024
Could you share your openapi docs in json? |
For people with the same problem: our solution was to create a custom attribute: <?php
namespace App\ApiBundle\Attribute\ApiDocs\Parameter;
use OpenApi\Attributes\Parameter;
use OpenApi\Attributes\Schema;
#[\Attribute(\Attribute::TARGET_CLASS_CONSTANT | \Attribute::TARGET_METHOD)]
final class Limit extends Parameter
{
public function __construct()
{
parent::__construct(
name: 'limit',
in: 'query',
description: 'How many entries to show?',
required: false,
schema: new Schema(type: 'integer'),
);
}
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
4.28.0
Description
Referencing a parameter defined in components duplicates the parameter in the rendered output.
working alternative
Compared to this case where there is no duplication:
Additional context
Seems similar to the problems described in #1739 and #1407
The error does not happen on parameters of
in: path
The text was updated successfully, but these errors were encountered: