swagger.json 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "This is a gateway server. On the page, you can go to do testing for every API.",
  5. "title": "Project adm-data-gateway's APIs",
  6. "contact": {},
  7. "version": "1.1"
  8. },
  9. "paths": {
  10. "/api/v1.0/query": {
  11. "post": {
  12. "description": "API查询",
  13. "consumes": [
  14. "application/json"
  15. ],
  16. "produces": [
  17. "application/json"
  18. ],
  19. "tags": [
  20. "query",
  21. "v1.0"
  22. ],
  23. "summary": "API查询",
  24. "parameters": [
  25. {
  26. "type": "string",
  27. "description": "appkey",
  28. "name": "appkey",
  29. "in": "header",
  30. "required": true
  31. },
  32. {
  33. "type": "string",
  34. "description": "timestamp",
  35. "name": "ts",
  36. "in": "header",
  37. "required": true
  38. },
  39. {
  40. "type": "string",
  41. "description": "签名",
  42. "name": "sign",
  43. "in": "header",
  44. "required": true
  45. },
  46. {
  47. "description": "body",
  48. "name": "body",
  49. "in": "body",
  50. "required": true,
  51. "schema": {
  52. "$ref": "#/definitions/v1.QueryBody"
  53. }
  54. }
  55. ],
  56. "responses": {
  57. "200": {
  58. "description": "响应信息",
  59. "schema": {
  60. "$ref": "#/definitions/v1.QueryResponse"
  61. }
  62. },
  63. "500": {
  64. "description": "Internal Server Error",
  65. "schema": {
  66. "$ref": "#/definitions/base.HTTPError"
  67. }
  68. }
  69. }
  70. }
  71. }
  72. },
  73. "definitions": {
  74. "base.HTTPError": {
  75. "type": "object",
  76. "properties": {
  77. "code": {
  78. "type": "integer",
  79. "format": "int",
  80. "example": 500
  81. },
  82. "message": {
  83. "type": "string",
  84. "example": "status bad request"
  85. }
  86. }
  87. },
  88. "v1.QueryBody": {
  89. "type": "object",
  90. "properties": {
  91. "api": {
  92. "type": "string"
  93. },
  94. "param": {
  95. "type": "string"
  96. }
  97. }
  98. },
  99. "v1.QueryResponse": {
  100. "type": "object",
  101. "properties": {
  102. "data": {
  103. "type": "string"
  104. }
  105. }
  106. }
  107. }
  108. }