如何使用swagger 2.0设置或替换cookie值

时间:2019-03-08 08:32:19

标签: swagger

我想从cookie中获取用户ID,如果可用,我需要骑车,否则插入cookie。现在我尝试在标头中设置它。

"get": {
                "summary": "This service used to get the student list.",
                "description": "This service used to get the student list.",
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "parameters": [
                    {
                        "name": "userId",
                        "in": "header",
                        "description": "cookies",
                        "required": true,
                        "type": "string"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "This service used to get student list"
                    }
                }
            }

0 个答案:

没有答案