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

Support alternate "@Annotation" style comment directives #1928

Open
simonnix opened this issue Nov 21, 2024 · 0 comments
Open

Support alternate "@Annotation" style comment directives #1928

simonnix opened this issue Nov 21, 2024 · 0 comments

Comments

@simonnix
Copy link

simonnix commented Nov 21, 2024

Is your feature request related to a problem? Please describe.
It is comprehensible that the Java style "@annotation" is somewhat what some other projects developpers of may want to use to annotate struct and functions and develop some tools.

I analysed the code (but did not test it) and did not find a way to make swag works well with other tools like golangAnnotations.

// @RestOperation( method = "GET", path = "/person/{uid}" )
func (s *Service) getPerson(c context.Context, uid string) (*Person, error) {
    ...
}

Describe the solution you'd like
It would be right to have an option on the command line to use a "namespace" annotations like "@Swag." :

// ShowAccount godoc
// @Swag.Summary      Show an account
// @Swag.Description  get string by ID
func (c *Controller) ShowAccount(ctx *gin.Context) {
}

**Describe alternatives you've considered**
Add an option to use another symbol for "@" (maybe "%").
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