URL: /docs/note Request: Method: Get Parameter: note Type: string In: path Required: true Respond: 200: Return success message 500: Return error message |
1 2 3 4 5 6 7 8 9 10 11 12 13 | info: version: "0.0.1" title: Docs API host: localhost:10010 basePath: /docs schemes: - http - https consumes: - application/json produces: - application/json - text/html |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | paths: /{filename}: get: description: Returns note special resource to the caller parameters: - name: filename in: path description: resource name required: true type: string responses: "200": description: Success schema: required: - message properties: message: type: string # responses may fall through to errors default: description: Error schema: required: - message properties: message: type: string |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | definitions: GeneralResponse: required: - message properties: message: type: string ErrorResponse: required: - message properties: message: type: string …… /{filename}: get: … responses: "200": description: Success schema: # a pointer to a definition $ref: "#/definitions/GeneralResponse" # responses may fall through to errors default: description: Error schema: $ref: "#/definitions/ErrorResponse" |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |