swagger.yaml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. definitions:
  2. base.HTTPError:
  3. properties:
  4. code:
  5. example: 500
  6. format: int
  7. type: integer
  8. message:
  9. example: status bad request
  10. type: string
  11. type: object
  12. v1.CodeGateCheckCodeBody:
  13. properties:
  14. BrushTime:
  15. type: string
  16. CodeType:
  17. type: string
  18. CodeVal:
  19. type: string
  20. IsOnline:
  21. type: string
  22. Property:
  23. type: string
  24. SN:
  25. type: string
  26. UID:
  27. type: string
  28. UKey:
  29. type: string
  30. ViewId:
  31. type: string
  32. type: object
  33. v1.CodeGateCheckCodeResponse:
  34. properties:
  35. Status:
  36. type: integer
  37. UID:
  38. type: string
  39. type: object
  40. v1.CodeGateIsConnectBody:
  41. properties:
  42. SN:
  43. type: string
  44. UID:
  45. type: string
  46. UKey:
  47. type: string
  48. ViewId:
  49. type: string
  50. type: object
  51. v1.CodeGateIsConnectResponse:
  52. properties:
  53. DateTime:
  54. type: string
  55. type: object
  56. v1.CodeGateQueryCmdBody:
  57. properties:
  58. DoorMagnetic:
  59. type: string
  60. SN:
  61. type: string
  62. TamperAlarm:
  63. type: string
  64. UID:
  65. type: string
  66. UKey:
  67. type: string
  68. ViewId:
  69. type: string
  70. type: object
  71. v1.CodeGateQueryCmdPostDataBody:
  72. properties:
  73. CmdCode:
  74. type: integer
  75. CmdID:
  76. type: string
  77. CmdParams:
  78. additionalProperties:
  79. items:
  80. additionalProperties:
  81. type: string
  82. type: object
  83. type: array
  84. type: object
  85. CmdStatus:
  86. type: integer
  87. SN:
  88. type: string
  89. UID:
  90. type: string
  91. UKey:
  92. type: string
  93. ViewId:
  94. type: string
  95. type: object
  96. v1.CodeGateQueryCmdPostDataResponse:
  97. properties:
  98. CmdStatus:
  99. type: integer
  100. CmdStatusDesc:
  101. type: integer
  102. type: object
  103. v1.CodeGateQueryCmdResponse:
  104. properties:
  105. CmdCode:
  106. type: integer
  107. CmdID:
  108. type: string
  109. CmdParams:
  110. description: CmdParams string `json:"CmdParams"`
  111. items:
  112. additionalProperties:
  113. type: string
  114. type: object
  115. type: array
  116. type: object
  117. info:
  118. contact: {}
  119. description: This is a gateway server. On the page, you can go to do testing for every API.
  120. license: {}
  121. title: Project property-device-gateway's APIs
  122. version: "1.1"
  123. paths:
  124. /api/CheckCode:
  125. post:
  126. consumes:
  127. - application/json
  128. description: 设备上传数据
  129. parameters:
  130. - description: ' '
  131. in: body
  132. name: body
  133. required: true
  134. schema:
  135. $ref: '#/definitions/v1.CodeGateCheckCodeBody'
  136. produces:
  137. - application/json
  138. responses:
  139. "200":
  140. description: OK
  141. schema:
  142. $ref: '#/definitions/v1.CodeGateCheckCodeResponse'
  143. "500":
  144. description: Internal Server Error
  145. schema:
  146. $ref: '#/definitions/base.HTTPError'
  147. summary: 设备上传数据
  148. tags:
  149. - 二维码门禁
  150. /api/IsConnect:
  151. post:
  152. consumes:
  153. - application/json
  154. description: 心跳
  155. parameters:
  156. - description: ' '
  157. in: body
  158. name: body
  159. required: true
  160. schema:
  161. $ref: '#/definitions/v1.CodeGateIsConnectBody'
  162. produces:
  163. - application/json
  164. responses:
  165. "200":
  166. description: OK
  167. schema:
  168. $ref: '#/definitions/v1.CodeGateIsConnectResponse'
  169. "500":
  170. description: Internal Server Error
  171. schema:
  172. $ref: '#/definitions/base.HTTPError'
  173. summary: 心跳
  174. tags:
  175. - 二维码门禁
  176. /api/QueryCmd:
  177. post:
  178. consumes:
  179. - application/json
  180. description: 轮询是否有命令
  181. parameters:
  182. - description: ' '
  183. in: body
  184. name: body
  185. required: true
  186. schema:
  187. $ref: '#/definitions/v1.CodeGateQueryCmdBody'
  188. produces:
  189. - application/json
  190. responses:
  191. "200":
  192. description: OK
  193. schema:
  194. $ref: '#/definitions/v1.CodeGateQueryCmdResponse'
  195. "500":
  196. description: Internal Server Error
  197. schema:
  198. $ref: '#/definitions/base.HTTPError'
  199. summary: 轮询是否有命令
  200. tags:
  201. - 二维码门禁
  202. /api/QueryCmdPostData:
  203. post:
  204. consumes:
  205. - application/json
  206. description: 命令执行结果
  207. parameters:
  208. - description: ' '
  209. in: body
  210. name: body
  211. required: true
  212. schema:
  213. $ref: '#/definitions/v1.CodeGateQueryCmdPostDataBody'
  214. produces:
  215. - application/json
  216. responses:
  217. "200":
  218. description: OK
  219. schema:
  220. $ref: '#/definitions/v1.CodeGateQueryCmdPostDataResponse'
  221. "500":
  222. description: Internal Server Error
  223. schema:
  224. $ref: '#/definitions/base.HTTPError'
  225. summary: 命令执行结果
  226. tags:
  227. - 二维码门禁
  228. swagger: "2.0"