蛋蛋星球-客户端
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

87 lines
2.5 KiB

  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "管理后台接口文档",
  5. "title": "蛋蛋星球-管理后台",
  6. "termsOfService": "http://swagger.io/terms/",
  7. "contact": {
  8. "name": "dengbiao",
  9. "url": "http://www.swagger.io/support",
  10. "email": "1239118001@qq.com"
  11. },
  12. "license": {
  13. "name": "Apache 2.0",
  14. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  15. },
  16. "version": "1.0"
  17. },
  18. "host": "localhost:4001",
  19. "paths": {
  20. "/api/demo": {
  21. "post": {
  22. "description": "Demo样例测试",
  23. "consumes": [
  24. "application/json"
  25. ],
  26. "produces": [
  27. "application/json"
  28. ],
  29. "tags": [
  30. "Demo"
  31. ],
  32. "summary": "Demo测试",
  33. "parameters": [
  34. {
  35. "description": "用户名密码",
  36. "name": "req",
  37. "in": "body",
  38. "required": true,
  39. "schema": {
  40. "type": "object"
  41. }
  42. }
  43. ],
  44. "responses": {
  45. "200": {
  46. "description": "token",
  47. "schema": {
  48. "type": "object",
  49. "additionalProperties": true
  50. }
  51. },
  52. "400": {
  53. "description": "具体错误",
  54. "schema": {
  55. "$ref": "#/definitions/md.Response"
  56. }
  57. }
  58. }
  59. }
  60. }
  61. },
  62. "definitions": {
  63. "md.Response": {
  64. "type": "object",
  65. "properties": {
  66. "code": {
  67. "type": "string",
  68. "example": "响应码"
  69. },
  70. "data": {
  71. "description": "内容"
  72. },
  73. "msg": {
  74. "type": "string",
  75. "example": "具体错误原因"
  76. }
  77. }
  78. }
  79. },
  80. "securityDefinitions": {
  81. "MasterID": {
  82. "type": "apiKey",
  83. "name": "MasterID",
  84. "in": "header"
  85. }
  86. }
  87. }