beego / bee

Bee is a tool for helping develop with beego app framework.
Apache License 2.0
1.44k stars 921 forks source link

当一个方法支持多种method时会产生同样的operation id #833

Open wangshxin opened 2 years ago

wangshxin commented 2 years ago

// @router [Get,Post] swagger文件的同一个path下,不同的method下会产生相同的operationID https://github.com/beego/bee/blob/develop/generate/swaggergen/g_docs.go#L571

flycash commented 2 years ago

I can not get your point, can you give more details or give a demo?

wangshxin commented 2 years ago

// @router / [Get,Post] func (c *DfsFileController) ListDfsFiles() {}

"/dfs-files/": { "get": { "tags": [ "dfs-files" ], "description": "List dfs files in a directory", "operationId": "ListDfsFiles", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ ... ], "responses": { "200": { ... }, "500": { ... } } }, "post": { "tags": [ "dfs-files" ], "description": "List dfs files in a directory", "operationId": "ListDfsFiles", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ ... ], "responses": { "200": { ... }, "500": { ... } } } },