Advertisement
Guest User

Untitled

a guest
May 9th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.92 KB | None | 0 0
  1. swagger: "2.0"
  2. info:
  3. description: "This is the FinTech Institution API server. This API is described in Swagger. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters."
  4. version: "1.0.0"
  5. title: "FinTech Institution API"
  6. termsOfService: "http://fintech.tecnocode.net/terms/"
  7. contact:
  8. email: "fintech@tecnocode.net"
  9. license:
  10. name: "Apache 2.0"
  11. url: "http://www.apache.org/licenses/LICENSE-2.0.html"
  12. host: "xyzbank.fintech.tecnocode.net"
  13. basePath: "/api"
  14. tags:
  15. - name: "institution"
  16. description: "Data about the institution"
  17. externalDocs:
  18. description: "Find out more"
  19. url: "http://fintech.tecnocode.net"
  20. - name: "transaction"
  21. description: "Access to Transactions"
  22. - name: "user"
  23. description: "Operations about user"
  24. externalDocs:
  25. description: "Find out more about our store"
  26. url: "http://fintech.tecnocode.net"
  27. schemes:
  28. - "http"
  29. paths:
  30. /institution:
  31. get:
  32. tags:
  33. - "institution"
  34. summary: "Institution information"
  35. description: "Returns the identification of this Institution"
  36. operationId: "getInstitution"
  37. produces:
  38. - "application/xml"
  39. - "application/json"
  40. responses:
  41. 200:
  42. description: "successful operation"
  43. schema:
  44. $ref: "#/definitions/Institution"
  45. security:
  46. - fintech_auth:
  47. - "read:institution"
  48. /transaction/{id}:
  49. get:
  50. tags:
  51. - "transaction"
  52. summary: "Find transaction by ID"
  53. description: "Returns a single Transaction"
  54. operationId: "getTransactionById"
  55. produces:
  56. - "application/xml"
  57. - "application/json"
  58. parameters:
  59. - name: "id"
  60. in: "path"
  61. description: "ID of Transaction to return"
  62. required: true
  63. type: "integer"
  64. format: "int64"
  65. responses:
  66. 200:
  67. description: "successful operation"
  68. schema:
  69. $ref: "#/definitions/Transaction"
  70. 400:
  71. description: "Invalid ID supplied"
  72. 404:
  73. description: "Transaction not found"
  74. security:
  75. - fintech_auth:
  76. - "read:transactions"
  77. /user/login:
  78. get:
  79. tags:
  80. - "user"
  81. summary: "Logs user into the system"
  82. description: ""
  83. operationId: "loginUser"
  84. produces:
  85. - "application/xml"
  86. - "application/json"
  87. parameters:
  88. - name: "username"
  89. in: "query"
  90. description: "The user name for login"
  91. required: true
  92. type: "string"
  93. - name: "password"
  94. in: "query"
  95. description: "The password for login in clear text"
  96. required: true
  97. type: "string"
  98. responses:
  99. 200:
  100. description: "successful operation"
  101. schema:
  102. type: "string"
  103. headers:
  104. X-Rate-Limit:
  105. type: "integer"
  106. format: "int32"
  107. description: "calls per hour allowed by the user"
  108. X-Expires-After:
  109. type: "string"
  110. format: "date-time"
  111. description: "date in UTC when token expires"
  112. 400:
  113. description: "Invalid username/password supplied"
  114. /user/logout:
  115. get:
  116. tags:
  117. - "user"
  118. summary: "Logs out current logged in user session"
  119. description: ""
  120. operationId: "logoutUser"
  121. produces:
  122. - "application/xml"
  123. - "application/json"
  124. parameters: []
  125. responses:
  126. default:
  127. description: "successful operation"
  128. securityDefinitions:
  129. fintech_auth:
  130. type: "oauth2"
  131. authorizationUrl: "http://fintech.tecnocode.net/oauth/dialog"
  132. flow: "implicit"
  133. scopes:
  134. read:institution: "read the Institution information"
  135. read:transactions: "read your Transactions"
  136. api_key:
  137. type: "apiKey"
  138. name: "api_key"
  139. in: "header"
  140. definitions:
  141. Transaction:
  142. type: "object"
  143. properties:
  144. id:
  145. type: "integer"
  146. format: "int64"
  147. amount:
  148. type: "integer"
  149. format: "int32"
  150. date:
  151. type: "string"
  152. format: "date-time"
  153. status:
  154. type: "string"
  155. description: "Transaction Status"
  156. enum:
  157. - "accepted"
  158. - "pending"
  159. - "cancelled"
  160. complete:
  161. type: "boolean"
  162. default: false
  163. xml:
  164. name: "Transaction"
  165. User:
  166. type: "object"
  167. properties:
  168. id:
  169. type: "integer"
  170. format: "int64"
  171. username:
  172. type: "string"
  173. firstName:
  174. type: "string"
  175. lastName:
  176. type: "string"
  177. email:
  178. type: "string"
  179. password:
  180. type: "string"
  181. phone:
  182. type: "string"
  183. userStatus:
  184. type: "integer"
  185. format: "int32"
  186. description: "User Status"
  187. xml:
  188. name: "User"
  189. Institution:
  190. type: "object"
  191. required:
  192. - "name"
  193. - "logoUrl"
  194. - "status"
  195. properties:
  196. id:
  197. type: "integer"
  198. format: "int64"
  199. name:
  200. type: "string"
  201. example: "XYZ Bank"
  202. description:
  203. type: "string"
  204. example: "XYZ Bank Description"
  205. logoUrl:
  206. type: "string"
  207. example: "http://cdn.xyzbank.com/images/logo.png"
  208. status:
  209. type: "string"
  210. description: "Institution status"
  211. enum:
  212. - "online"
  213. - "offline"
  214. - "abandoned"
  215. xml:
  216. name: "Institution"
  217. ApiResponse:
  218. type: "object"
  219. properties:
  220. code:
  221. type: "integer"
  222. format: "int32"
  223. type:
  224. type: "string"
  225. message:
  226. type: "string"
  227. externalDocs:
  228. description: "Find out more about FinTech"
  229. url: "http://www.tecnocode.net"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement