Advertisement
Guest User

Untitled

a guest
Jan 19th, 2022
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.16 KB | None | 0 0
  1. {
  2. "basePath": "/",
  3. "definitions": {
  4. "CanUserSignDocumentRequest": {
  5. "properties": {
  6. "user_id": {
  7. "type": "string"
  8. }
  9. },
  10. "type": "object"
  11. },
  12. "CanUserSignDocumentResponse": {
  13. "properties": {
  14. "data": {
  15. "properties": {
  16. "can_user_sign_document": {
  17. "type": "boolean"
  18. }
  19. },
  20. "type": "object"
  21. },
  22. "success": {
  23. "type": "boolean"
  24. }
  25. },
  26. "type": "object"
  27. },
  28. "ErrorResponse": {
  29. "default": "{\"errors\": [{\"code\": \"400\",\"description\": \"Bad request\"}],\"success\": false}",
  30. "properties": {
  31. "errors": {
  32. "items": {
  33. "$ref": "#/definitions/ErrorResponse_Error"
  34. },
  35. "type": "array"
  36. },
  37. "success": {
  38. "type": "boolean"
  39. }
  40. },
  41. "type": "object"
  42. },
  43. "ErrorResponse_Error": {
  44. "properties": {
  45. "code": {
  46. "type": "string"
  47. },
  48. "data": {
  49. "$ref": "#/definitions/Struct"
  50. },
  51. "description": {
  52. "type": "string"
  53. }
  54. },
  55. "type": "object"
  56. },
  57. "SignDocumentRequest": {
  58. "properties": {
  59. "document_type": {
  60. "type": "string"
  61. },
  62. "session_id": {
  63. "type": "string"
  64. },
  65. "time": {
  66. "$ref": "#/definitions/Timestamp"
  67. },
  68. "user_id": {
  69. "type": "string"
  70. }
  71. },
  72. "type": "object"
  73. },
  74. "SignDocumentResponse": {
  75. "properties": {
  76. "data": {
  77. "properties": {
  78. "document_id": {
  79. "format": "int32",
  80. "type": "integer"
  81. },
  82. "document_url": {
  83. "type": "string"
  84. },
  85. "hash": {
  86. "type": "string"
  87. },
  88. "salt": {
  89. "type": "string"
  90. }
  91. },
  92. "type": "object"
  93. },
  94. "success": {
  95. "type": "boolean"
  96. }
  97. },
  98. "type": "object"
  99. },
  100. "Struct": {
  101. "properties": {
  102. "fields": {
  103. "additionalProperties": {
  104. "$ref": "#/definitions/Value"
  105. },
  106. "type": "object"
  107. }
  108. },
  109. "type": "object"
  110. },
  111. "Timestamp": {
  112. "properties": {
  113. "nanos": {
  114. "format": "int32",
  115. "type": "integer"
  116. },
  117. "seconds": {
  118. "format": "int64",
  119. "type": "integer"
  120. }
  121. },
  122. "type": "object"
  123. },
  124. "Value": {
  125. "type": "object"
  126. }
  127. },
  128. "info": {
  129. "contact": {
  130. "name": ""
  131. },
  132. "description": "desc... =)",
  133. "license": {
  134. "name": ""
  135. },
  136. "termsOfService": "",
  137. "title": "Docs API",
  138. "version": "1.0"
  139. },
  140. "paths": {
  141. "/canUserSignDocument": {
  142. "post": {
  143. "description": "Can user sign document",
  144. "parameters": [
  145. {
  146. "in": "body",
  147. "name": "body",
  148. "required": true,
  149. "schema": {
  150. "$ref": "#/definitions/CanUserSignDocumentRequest"
  151. }
  152. }
  153. ],
  154. "responses": {
  155. "200": {
  156. "description": "Request success",
  157. "schema": {
  158. "$ref": "#/definitions/CanUserSignDocumentResponse"
  159. }
  160. },
  161. "400": {
  162. "description": "Bad request",
  163. "schema": {
  164. "$ref": "#/definitions/ErrorResponse"
  165. }
  166. },
  167. "401": {
  168. "description": "Unauthorized"
  169. },
  170. "403": {
  171. "description": "Forbidden"
  172. },
  173. "404": {
  174. "description": "Not found"
  175. },
  176. "500": {
  177. "description": "Internal server error"
  178. }
  179. },
  180. "summary": "",
  181. "tags": [
  182. "Private"
  183. ]
  184. }
  185. },
  186. "/signDocument": {
  187. "post": {
  188. "description": "Sign document",
  189. "parameters": [
  190. {
  191. "in": "body",
  192. "name": "body",
  193. "required": true,
  194. "schema": {
  195. "$ref": "#/definitions/SignDocumentRequest"
  196. }
  197. }
  198. ],
  199. "responses": {
  200. "200": {
  201. "description": "Request success",
  202. "schema": {
  203. "$ref": "#/definitions/SignDocumentResponse"
  204. }
  205. },
  206. "400": {
  207. "description": "Bad request",
  208. "schema": {
  209. "$ref": "#/definitions/ErrorResponse"
  210. }
  211. },
  212. "401": {
  213. "description": "Unauthorized"
  214. },
  215. "403": {
  216. "description": "Forbidden"
  217. },
  218. "404": {
  219. "description": "Not found"
  220. },
  221. "500": {
  222. "description": "Internal server error"
  223. }
  224. },
  225. "summary": "",
  226. "tags": [
  227. "Private"
  228. ]
  229. }
  230. }
  231. },
  232. "schemes": [
  233. "http",
  234. "https"
  235. ],
  236. "swagger": "2.0"
  237. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement