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

ignores extra closing brackets #420

Open
ivan1986 opened this issue Jul 23, 2021 · 0 comments
Open

ignores extra closing brackets #420

ivan1986 opened this issue Jul 23, 2021 · 0 comments

Comments

@ivan1986
Copy link

If the balance of parentheses is violated in the annotation and additional closing parentheses are present, then the parser does not generate an error.
In some annotations, this can lead to nesting errors, due to the forgotten closing parenthesis deep in the nested annotations

For example - ObjectResponseDto")) - last bracket move response=400 outsode post, but it's hard to see

     * @OA\Post(path="/cart/api/item/{id}", summary="Update item quantity", tags={"Cart API"},
     *   @OA\Parameter(
     *     name="id",
     *     in="path",
     *     description="itemId",
     *     @OA\Schema(type="string")
     *   ),
     *   @OA\RequestBody(required=true, @OA\JsonContent(type="object",
     *     @OA\Property(property="quantity", description="Quantity", type="number"),
     *   )),
     *   @OA\Response(response=200, description="Item updated successfully",
     *     @OA\JsonContent(type="object", ref="#/components/schemas/ObjectResponseDto"))
     *   ),
     *   @OA\Response(response=400, description="Invalid params"),
     *   @OA\Response(response=404, description="Method not found"),
     * )

I think parser need check brackets balanse and generate error

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

No branches or pull requests

1 participant