Skip to content

Commit

Permalink
fix: 修复swagger文档部分参数没有说明问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zodial committed Oct 18, 2023
1 parent addbd09 commit 6fb2f68
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions console/commands/swagger.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,8 @@ func messageToSchemas(pge string, message parser.Message, swagger *openapi.Spec)
if isProtoBaseType(option.Ty) {
// 基础类型的数组
attr := &openapi.Schema{
Type: "array",
Type: "array",
Description: doc,
Items: &openapi.Schema{
Description: doc,
Type: getProtoToSwagger(option.Ty),
Expand All @@ -421,7 +422,8 @@ func messageToSchemas(pge string, message parser.Message, swagger *openapi.Spec)
} else {
// 引用其他对象
attr := &openapi.Schema{
Type: "array",
Type: "array",
Description: doc,
Items: &openapi.Schema{
Ref: getRef(pge, option.Ty),
Description: doc,
Expand Down

0 comments on commit 6fb2f68

Please sign in to comment.