소스 검색

修改Swagger鉴权的BUG

Simon Zhou 5 년 전
부모
커밋
07ab768f6f
4개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      controllers/cptrade/cpTrade.go
  2. 5 0
      docs/docs.go
  3. 5 0
      docs/swagger.json
  4. 2 0
      docs/swagger.yaml

+ 1 - 0
controllers/cptrade/cpTrade.go

@@ -47,6 +47,7 @@ func (Cptradepresaleapply) TableName() string {
 // QueryPreasleApply 查询产能预售申请表信息
 // @Summary 查询产能预售申请表信息
 // @Produce json
+// @Security ApiKeyAuth
 // @Param userid query int true "账户ID"
 // @Param applyid query int false "申请ID"
 // @Param accountid query int false "资金账户ID"

+ 5 - 0
docs/docs.go

@@ -28,6 +28,11 @@ var doc = `{
     "paths": {
         "/CPTrade/QueryPreasleApply": {
             "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
                 "produces": [
                     "application/json"
                 ],

+ 5 - 0
docs/swagger.json

@@ -12,6 +12,11 @@
     "paths": {
         "/CPTrade/QueryPreasleApply": {
             "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
                 "produces": [
                     "application/json"
                 ],

+ 2 - 0
docs/swagger.yaml

@@ -100,6 +100,8 @@ paths:
           description: Internal Server Error
           schema:
             $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
       summary: 查询产能预售申请表信息
       tags:
       - 产能预售