swaggo / swag

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

Allow adding operationId #1918

Closed RaresGeo closed 3 weeks ago

RaresGeo commented 4 weeks ago

Is your feature request related to a problem? Please describe. My team cannot use swaggo to autogenerate swagger because we need operationId, which is used by swagger-typescript-api to name methods

Describe the solution you'd like Allow a simple @operationId tag

Describe alternatives you've considered Construct it out of the Summary by turning for example Update project config to operationId: updateProjectConfig in the generated .yaml file

RaresGeo commented 4 weeks ago

Please note there was an issue open about this in the past and it was closed but without actually adding the feature, not sure why.

I can make a PR myself

oPOCCOMAXAo commented 4 weeks ago

It is supported. Use:

// @ID some_operation_id
RaresGeo commented 3 weeks ago

Oh, I couldn't find anything like that in the documentation. Thanks :)