swagger.yml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. swagger: "2.0"
  2. info:
  3. title: Common API docs of GD.
  4. description: This is common API docs,any developer can test each API in the page.
  5. version: "1.0"
  6. license:
  7. name: Apache 2.0
  8. url: http://www.apache.org/licenses/LICENSE-2.0.html
  9. basePath: /api
  10. paths:
  11. /v1/query/{code}:
  12. get:
  13. tags:
  14. - v1
  15. description: 查询车辆相关信息
  16. operationId: CenterController.query vehicle info
  17. parameters:
  18. - in: header
  19. name: appkey
  20. description: appkey
  21. type: string
  22. - in: header
  23. name: token
  24. description: token
  25. type: string
  26. - in: header
  27. name: timestamp
  28. description: 时间戳
  29. type: string
  30. - in: header
  31. name: sign
  32. description: 签名
  33. type: string
  34. - in: path
  35. name: code
  36. description: code
  37. required: true
  38. type: string
  39. responses:
  40. "200":
  41. description: '"响应信息"'
  42. schema:
  43. $ref: '#/definitions/.CommonResponse'
  44. "500":
  45. description: 服务器错误
  46. /v1/service/{code}:
  47. get:
  48. tags:
  49. - v1
  50. description: 查询相关信息
  51. operationId: CenterController.query info
  52. parameters:
  53. - in: header
  54. name: appkey
  55. description: appkey
  56. type: string
  57. - in: header
  58. name: token
  59. description: token
  60. type: string
  61. - in: header
  62. name: timestamp
  63. description: 时间戳
  64. type: string
  65. - in: header
  66. name: sign
  67. description: 签名
  68. type: string
  69. - in: path
  70. name: code
  71. description: code
  72. required: true
  73. type: string
  74. responses:
  75. "200":
  76. description: '"响应信息"'
  77. schema:
  78. $ref: '#/definitions/.CommonResponse'
  79. "500":
  80. description: 服务器错误
  81. /v1/token:
  82. get:
  83. tags:
  84. - v1
  85. description: 获取token
  86. operationId: CenterController.query app login
  87. parameters:
  88. - in: query
  89. name: user
  90. description: 用户名
  91. required: true
  92. type: string
  93. - in: query
  94. name: password
  95. description: 密码
  96. required: true
  97. type: string
  98. responses:
  99. "200":
  100. description: '"响应信息"'
  101. schema:
  102. $ref: '#/definitions/.VehicleLoginResponse'
  103. "500":
  104. description: 服务器错误
  105. definitions:
  106. .CommonResponse:
  107. type: object
  108. .VehicleLoginResponse:
  109. type: object
  110. tags:
  111. - name: v1
  112. description: |
  113. Operations about vehicle