2015-09-15 49 views
0

由於ugprading從1.5.3招搖1.5.3-M1設置了一個param我注意到我們的swagger.json文件是不同的(錯誤)揚鞭1.5.3列出了「身體」作爲GET retquests

樣之前,獲取請求將如下所示。

"paths":{ 
     "/stores":{ 
     "get":{ 
      "tags":[ 
       "stores" 
      ], 
      "summary":"Retrieve a list of stores", 
      "description":"", 
      "operationId":"getStores", 
      "produces":[ 
       "application/json" 
      ], 
      "parameters":[ 
       { 
        "name":"api_key", 
        "in":"query", 
        "description":"API consumer key", 
        "required":false, 
        "type":"string" 
       }, 
       { 
        "name":"onlyConnectedStores", 
        "in":"query", 
        "description":"Only select connected stores", 
        "required":false, 
        "type":"string" 
       }, 
       { 
        "name":"offset", 
        "in":"query", 
        "description":"Number of records to offset before returning first record", 
        "required":false, 
        "type":"string", 
        "default":"0" 
       }, 
       { 
        "name":"limit", 
        "in":"query", 
        "description":"Number of records to return", 
        "required":false, 
        "type":"string", 
        "default":"10" 
       } 
      ], 

現在它看起來像這樣

"paths":{ 
     "/stores":{ 
     "get":{ 
      "tags":[ 
       "stores" 
      ], 
      "summary":"Retrieve a list of stores", 
      "description":"", 
      "operationId":"getStores", 
      "produces":[ 
       "application/json" 
      ], 
      "parameters":[ 
       { 
        "in":"body", 
        "name":"body", 
        "required":false, 
        "schema":{ 
        "$ref":"#/definitions/AsynchronousResponse" 
        } 
       }, 
       { 
        "name":"api_key", 
        "in":"query", 
        "description":"API consumer key", 
        "required":true, 
        "type":"string" 
       }, 
       { 
        "name":"onlyConnectedStores", 
        "in":"query", 
        "description":"Only select connected stores", 
        "required":false, 
        "type":"string", 
        "default":"false" 
       }, 
       { 
        "name":"offset", 
        "in":"query", 
        "description":"Number of records to offset before returning first record", 
        "required":false, 
        "type":"string", 
        "default":"0" 
       }, 
       { 
        "name":"limit", 
        "in":"query", 
        "description":"Number of records to return", 
        "required":false, 
        "type":"string", 
        "default":"10" 
       } 
      ], 

是因爲這一點,似乎顯示身體爲我們的任何GET請求的參數時,有沒有事實「體」參數。

enter image description here

任何IDA爲什麼這個額外的「身體」參數將顯示出來上整合了最新版本招搖?

回答

0

是的,這是由於一些行爲改變。我假設有問題的方法有一個名爲AsynchronousResponse的參數。如果您可以使用方法簽名在項目上打開問題,這將有所幫助,因此我們可以默認隱藏參數。

與此同時,您可以通過添加該方法參數@ApiParam(hidden=true)來隱藏它。