swagger.json 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "contact": {}
  5. },
  6. "paths": {
  7. "/admin/login": {
  8. "post": {
  9. "description": "管理员登陆",
  10. "consumes": [
  11. "application/json"
  12. ],
  13. "produces": [
  14. "application/json"
  15. ],
  16. "tags": [
  17. "管理员借口"
  18. ],
  19. "summary": "管理员登陆",
  20. "operationId": "/admin/login",
  21. "parameters": [
  22. {
  23. "description": "body",
  24. "name": "body",
  25. "in": "body",
  26. "required": true,
  27. "schema": {
  28. "$ref": "#/definitions/dto.AdminLoginInput"
  29. }
  30. }
  31. ],
  32. "responses": {
  33. "200": {
  34. "description": "success",
  35. "schema": {
  36. "allOf": [
  37. {
  38. "$ref": "#/definitions/middleware.Response"
  39. },
  40. {
  41. "type": "object",
  42. "properties": {
  43. "data": {
  44. "$ref": "#/definitions/dto.AdminLoginOutput"
  45. }
  46. }
  47. }
  48. ]
  49. }
  50. }
  51. }
  52. }
  53. }
  54. },
  55. "definitions": {
  56. "dto.AdminLoginInput": {
  57. "type": "object",
  58. "required": [
  59. "password",
  60. "username"
  61. ],
  62. "properties": {
  63. "password": {
  64. "type": "string",
  65. "example": ""
  66. },
  67. "username": {
  68. "type": "string",
  69. "example": ""
  70. }
  71. }
  72. },
  73. "dto.AdminLoginOutput": {
  74. "type": "object",
  75. "properties": {
  76. "token": {
  77. "type": "string",
  78. "example": "token"
  79. }
  80. }
  81. },
  82. "middleware.Response": {
  83. "type": "object",
  84. "properties": {
  85. "data": {},
  86. "errmsg": {
  87. "type": "string"
  88. },
  89. "errno": {
  90. "type": "integer"
  91. },
  92. "stack": {},
  93. "trace_id": {}
  94. }
  95. }
  96. }
  97. }