swaggo / swag

Automatically generate RESTful API documentation with Swagger 2.0 for Go.
MIT License
10.24k stars 1.17k forks source link

Parenthesis not registering in @Router #1799

Open alifemove opened 3 months ago

alifemove commented 3 months ago

Describe the bug ParseComment error when using a parenthesis in a valid location in the @Router

To Reproduce Steps to reproduce the behavior:

// @Router       /v2/odata/Resource({id}) [get]

Expected behavior No error, swagger page generated

Your swag version 1.16.2

Your go version 1.21.6

Desktop (please complete the following information):

Additional context

2024/04/24 08:39:25 ParseComment error in file /Users/local/Documents/goTest/src/odata/single_resource.go :can not parse router comment "/odata/Resource({id}) [get]"