swag icon indicating copy to clipboard operation
swag copied to clipboard

Support custom ignore tag

Open weilence opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. When I'm using restful api, the id parameter is bound on the url path. The framework I use is gin, so the uri:id tag will be used on the request object, but I still need to add an additional swaggerignore=true tag to ignore swagger to generate documentation

Describe the solution you'd like I want to be able to customize ignore tags

Describe alternatives you've considered .

Additional context .

weilence avatar Aug 22 '22 14:08 weilence

Can you please provide a full example, so we better understand the issue?

ubogdan avatar Sep 17 '22 20:09 ubogdan

Restful put api like /user/:id with request body {"name": "tom"} bind to struct

type user struct {
    ID string `uri:"id"`
    Name string `json:"name"`
    ...<other field>
}

The uri tag is used to bind path variable, so I need add a swaggerignore tag to ignore in swaggo

weilence avatar Sep 19 '22 13:09 weilence

Are there plans to work on this ?

IshanDaga avatar May 05 '23 15:05 IshanDaga