<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                [TOC] > [參考](https://goswagger.io/use/spec/route.html) ## router 語法 ``` swagger:route [method] [path pattern] [?tag1 tag2 tag3] [operation id] ``` | Annotation | Format | | --- | --- | | **Consumes** | a list of operation specific mime type values, one per line, for the content the API receives | | **Produces** | a list of operation specific mime type values, one per line, for the content the API sends | | **Schemes** | a list of operation specific schemes the API accept (possible values: http, https, ws, wss) https is preferred as default when configured | | **Deprecated** | Route marked as deprecated if this value is true | | **Security** | a dictionary of key: \[\]string{scopes} | | **Parameters** | a list of parameters that this API accepts | | **Responses** | a dictionary of status code to named response | 在route 中設置 參數的方式有兩種,一個是在 route 中填寫 Parameters,另一個綁定另一個 聲明為`Parameters` 的結構體 code ``` // swagger:route GET /users/{id} users1 getSingleUser // // get a user by userID // // This will show a user info // // Consumes: // - application/json // - application/x-protobuf // // Produces: // - application/json // - application/x-protobuf // // Parameters: // + name: limit // in: query // description: maximum numnber of results to return // required: false // type: integer // format: int32 // // Security: // api_key: // oauth: read, write // // Responses: // 200: swaggScsResp func Chat(c *gin.Context) { ``` code 中的 `getSingleUser ` 需要與 parameters 的名稱綁定 如 ``` // swagger:parameters getSingleUser type chatParam struct { // an id of user info // // Required: true // unique: true // in: path // Example:"asdsad" Q string `form:"q" example:"a"` // aaaaaaaaaaa // // Required: true // in: Query A string `form:"11" exmaple:"aaa"` } ``` `swagger:parameters getSingleUser` 中 `getSingleUser` 表示對這個元素的名稱 **result** ``` --- paths: /users/{id}: get: consumes: - application/json - application/x-protobuf description: This will show a user info operationId: getSingleUser parameters: - description: an id of user info in: path name: Q required: true type: string - description: aaaaaaaaaaa in: query name: A required: true type: string - description: maximum numnber of results to return format: int32 in: query name: limit type: integer produces: - application/json - application/x-protobuf responses: "200": $ref: '#/responses/swaggScsResp' security: - api_key: [] - oauth: - read - write summary: get a user by userID tags: - users1 ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看