Advertisement
Guest User

Untitled

a guest
May 8th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.66 KB | None | 0 0
  1. swagger: "2.0"
  2. info:
  3. description: |
  4. This is a sample server.
  5.  
  6. [Learn about Swagger](http://swagger.io) or join the IRC channel `#swagger` on irc.freenode.net.
  7.  
  8. For this sample, you can use the api key `special-key` to test the authorization filters
  9. version: "1.0.0"
  10. title: Pasagi App
  11. termsOfService: http://paduraksa-teknologi.com/terms/
  12. contact:
  13. name: ry.ridwan.yusuf@gmail.com
  14. host: paduraksa-teknologi.com
  15. basePath: /pasagi
  16. schemes:
  17. - http
  18. - https
  19. paths:
  20. /login:
  21. post:
  22. tags:
  23. - auth
  24. summary: Logs user into the system
  25. description: ""
  26. operationId: loginUser
  27. produces:
  28. - application/json
  29. parameters:
  30. - in: header
  31. name: username
  32. description: The user name for login
  33. required: false
  34. type: string
  35. - in: header
  36. name: password
  37. description: The password for login encrypted ()
  38. required: false
  39. type: string
  40. responses:
  41. "200":
  42. description: successful operation
  43. schema:
  44. type: string
  45. "400":
  46. description: Invalid username/password supplied
  47. security:
  48. - x-pasagi-app-id: []
  49. - x-pasagi-app-key: []
  50. - x-pasagi-dev-id: []
  51. - x-pasagi-usr-key: []
  52. - x-pasagi-cc: []
  53. - x-pasagi-dt: []
  54. - x-pasagi-st: []
  55. - x-pasagi-lat: []
  56. - x-pasagi-lon: []
  57. /logout:
  58. get:
  59. tags:
  60. - auth
  61. summary: Logs out current logged in user session
  62. description: ""
  63. operationId: logoutUser
  64. produces:
  65. - application/json
  66. responses:
  67. default:
  68. description: successful operation
  69. security:
  70. - x-pasagi-app-id: []
  71. - x-pasagi-app-key: []
  72. - x-pasagi-dev-id: []
  73. - x-pasagi-usr-key: []
  74. - x-pasagi-dev-token: []
  75. - x-pasagi-cc: []
  76. - x-pasagi-dt: []
  77. - x-pasagi-st: []
  78. - x-pasagi-lat: []
  79. - x-pasagi-lon: []
  80. /users:
  81. post:
  82. tags:
  83. - user
  84. summary: Create user
  85. description: This can only be done by the logged in user.
  86. operationId: createUser
  87. produces:
  88. - application/json
  89. - application/xml
  90. parameters:
  91. - in: body
  92. name: body
  93. description: Created user object
  94. required: false
  95. schema:
  96. $ref: "#/definitions/User"
  97. responses:
  98. default:
  99. description: successful operation
  100. /users/createWithArray:
  101. post:
  102. tags:
  103. - user
  104. summary: Creates list of users with given input array
  105. description: ""
  106. operationId: createUsersWithArrayInput
  107. produces:
  108. - application/json
  109. - application/xml
  110. parameters:
  111. - in: body
  112. name: body
  113. description: List of user object
  114. required: false
  115. schema:
  116. type: array
  117. items:
  118. $ref: "#/definitions/User"
  119. responses:
  120. default:
  121. description: successful operation
  122. /users/createWithList:
  123. post:
  124. tags:
  125. - user
  126. summary: Creates list of users with given input array
  127. description: ""
  128. operationId: createUsersWithListInput
  129. produces:
  130. - application/json
  131. - application/xml
  132. parameters:
  133. - in: body
  134. name: body
  135. description: List of user object
  136. required: false
  137. schema:
  138. type: array
  139. items:
  140. $ref: "#/definitions/User"
  141. responses:
  142. default:
  143. description: successful operation
  144. /users/{username}:
  145. get:
  146. tags:
  147. - user
  148. summary: Get user by user name
  149. description: ""
  150. operationId: getUserByName
  151. produces:
  152. - application/json
  153. - application/xml
  154. parameters:
  155. - in: path
  156. name: username
  157. description: The name that needs to be fetched. Use user1 for testing.
  158. required: true
  159. type: string
  160. responses:
  161. "404":
  162. description: User not found
  163. "200":
  164. description: successful operation
  165. schema:
  166. $ref: "#/definitions/User"
  167. "400":
  168. description: Invalid username supplied
  169. put:
  170. tags:
  171. - user
  172. summary: Updated user
  173. description: This can only be done by the logged in user.
  174. operationId: updateUser
  175. produces:
  176. - application/json
  177. - application/xml
  178. parameters:
  179. - in: path
  180. name: username
  181. description: name that need to be deleted
  182. required: true
  183. type: string
  184. - in: body
  185. name: body
  186. description: Updated user object
  187. required: false
  188. schema:
  189. $ref: "#/definitions/User"
  190. responses:
  191. "404":
  192. description: User not found
  193. "400":
  194. description: Invalid user supplied
  195. delete:
  196. tags:
  197. - user
  198. summary: Delete user
  199. description: This can only be done by the logged in user.
  200. operationId: deleteUser
  201. produces:
  202. - application/json
  203. - application/xml
  204. parameters:
  205. - in: path
  206. name: username
  207. description: The name that needs to be deleted
  208. required: true
  209. type: string
  210. responses:
  211. "404":
  212. description: User not found
  213. "400":
  214. description: Invalid username supplied
  215. /stores/order:
  216. post:
  217. tags:
  218. - store
  219. summary: Place an order for a pet
  220. description: ""
  221. operationId: placeOrder
  222. produces:
  223. - application/json
  224. - application/xml
  225. parameters:
  226. - in: body
  227. name: body
  228. description: order placed for purchasing the pet
  229. required: false
  230. schema:
  231. $ref: "#/definitions/Order"
  232. responses:
  233. "200":
  234. description: successful operation
  235. schema:
  236. $ref: "#/definitions/Order"
  237. "400":
  238. description: Invalid Order
  239. /stores/order/{orderId}:
  240. get:
  241. tags:
  242. - store
  243. summary: Find purchase order by ID
  244. description: For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
  245. operationId: getOrderById
  246. produces:
  247. - application/json
  248. - application/xml
  249. parameters:
  250. - in: path
  251. name: orderId
  252. description: ID of pet that needs to be fetched
  253. required: true
  254. type: string
  255. responses:
  256. "404":
  257. description: Order not found
  258. "200":
  259. description: successful operation
  260. schema:
  261. $ref: "#/definitions/Order"
  262. "400":
  263. description: Invalid ID supplied
  264. delete:
  265. tags:
  266. - store
  267. summary: Delete purchase order by ID
  268. description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
  269. operationId: deleteOrder
  270. produces:
  271. - application/json
  272. - application/xml
  273. parameters:
  274. - in: path
  275. name: orderId
  276. description: ID of the order that needs to be deleted
  277. required: true
  278. type: string
  279. responses:
  280. "404":
  281. description: Order not found
  282. "400":
  283. description: Invalid ID supplied
  284. securityDefinitions:
  285. x-pasagi-app-id:
  286. type: apiKey
  287. name: x-pasagi-app-id
  288. in: header
  289. description: Registered application id
  290. x-pasagi-app-key:
  291. type: apiKey
  292. name: x-pasagi-app-key
  293. in: header
  294. description: Registered application key
  295. x-pasagi-dev-id:
  296. type: apiKey
  297. name: x-pasagi-dev-id
  298. in: header
  299. description: Device ID (MAC Address/ phone number/ ymid/ etc)
  300. x-pasagi-usr-key:
  301. type: apiKey
  302. name: x-pasagi-usr-key
  303. in: header
  304. description: User Key
  305. x-pasagi-dev-token:
  306. type: apiKey
  307. name: x-pasagi-dev-token
  308. in: header
  309. description: Short lived token from login, that's needed for other request
  310. x-pasagi-dt:
  311. type: apiKey
  312. name: x-pasagi-dt
  313. in: header
  314. description: timestamp
  315. x-pasagi-st:
  316. type: apiKey
  317. name: x-pasagi-st
  318. in: header
  319. description: System Trace Audit Number
  320. x-pasagi-cc:
  321. type: apiKey
  322. name: x-pasagi-cc
  323. in: header
  324. description: channel code (WEB/ MOBILE/ SMS/ H2H/ GTALK/ YM)
  325. x-pasagi-lat:
  326. type: apiKey
  327. name: x-pasagi-lat
  328. in: header
  329. description: Location Latitude
  330. x-pasagi-lon:
  331. type: apiKey
  332. name: x-pasagi-lon
  333. in: header
  334. description: Location Longitude
  335.  
  336. definitions:
  337. User:
  338. type: object
  339. properties:
  340. id:
  341. type: integer
  342. format: int64
  343. username:
  344. type: string
  345. firstName:
  346. type: string
  347. lastName:
  348. type: string
  349. email:
  350. type: string
  351. password:
  352. type: string
  353. phone:
  354. type: string
  355. userStatus:
  356. type: integer
  357. format: int32
  358. description: User Status
  359. Order:
  360. type: object
  361. properties:
  362. id:
  363. type: integer
  364. format: int64
  365. petId:
  366. type: integer
  367. format: int64
  368. quantity:
  369. type: integer
  370. format: int32
  371. shipDate:
  372. type: string
  373. format: date-time
  374. status:
  375. type: string
  376. description: Order Status
  377. complete:
  378. type: boolean
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement