Advertisement
Guest User

Untitled

a guest
Feb 7th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.74 KB | None | 0 0
  1. basePath: /v1
  2. consumes:
  3. - application/json
  4. definitions:
  5. SBC:
  6. properties:
  7. ip:
  8. type: string
  9. username:
  10. type: string
  11. password:
  12. type: string
  13. realm:
  14. type: string
  15. required:
  16. - ip
  17. type: object
  18. CCM:
  19. properties:
  20. ip:
  21. type: string
  22. username:
  23. type: string
  24. required:
  25. - ip
  26. type: object
  27. DIDAssociation:
  28. properties:
  29. did:
  30. type: number
  31. format: double
  32. extension:
  33. type: number
  34. format: double
  35. required:
  36. - did
  37. - extension
  38. type: object
  39. Customer:
  40. properties:
  41. sbc:
  42. $ref: '#/definitions/SBC'
  43. ccm:
  44. $ref: '#/definitions/CCM'
  45. didAssociations:
  46. type: array
  47. items:
  48. $ref: '#/definitions/DIDAssociation'
  49. id:
  50. type: number
  51. format: double
  52. type: object
  53. CustomerCreateRequest:
  54. properties:
  55. sbc:
  56. $ref: '#/definitions/SBC'
  57. ccm:
  58. $ref: '#/definitions/CCM'
  59. didAssociations:
  60. type: array
  61. items:
  62. $ref: '#/definitions/DIDAssociation'
  63. type: object
  64. CustomerUpdateRequest:
  65. properties:
  66. sbc:
  67. $ref: '#/definitions/SBC'
  68. ccm:
  69. $ref: '#/definitions/CCM'
  70. didAssociations:
  71. type: array
  72. items:
  73. $ref: '#/definitions/DIDAssociation'
  74. type: object
  75. info:
  76. title: tsoa-example
  77. version: 0.0.1
  78. description: An example app using tsoa
  79. license:
  80. name: MIT
  81. paths:
  82. /Customer/All:
  83. get:
  84. operationId: All
  85. produces:
  86. - application/json
  87. responses:
  88. '200':
  89. description: Ok
  90. schema:
  91. $ref: '#/definitions/Customer'
  92. examples:
  93. application/json:
  94. didAssociations: []
  95. sbc:
  96. password: aeiou
  97. ip: aeiou
  98. realm: aeiou
  99. username: aeiou
  100. id: 0
  101. description: 'Get All the users '
  102. security: []
  103. parameters: []
  104. /Customer:
  105. post:
  106. operationId: Create
  107. produces:
  108. - application/json
  109. responses:
  110. '200':
  111. description: Ok
  112. schema:
  113. $ref: '#/definitions/Customer'
  114. description: Create a customer
  115. security: []
  116. parameters:
  117. - description: This is a user creation request description
  118. in: body
  119. name: request
  120. required: true
  121. schema:
  122. $ref: '#/definitions/CustomerCreateRequest'
  123. '/Customer/{customerId}':
  124. get:
  125. operationId: Get
  126. produces:
  127. - application/json
  128. responses:
  129. '200':
  130. description: Ok
  131. schema:
  132. $ref: '#/definitions/Customer'
  133. description: 'Get a customer by customerId '
  134. security: []
  135. parameters:
  136. - in: path
  137. name: customerId
  138. required: true
  139. format: double
  140. type: number
  141. patch:
  142. operationId: Update
  143. produces:
  144. - application/json
  145. responses:
  146. '200':
  147. description: Ok
  148. schema:
  149. $ref: '#/definitions/Customer'
  150. description: 'Update a customer by customerId '
  151. security: []
  152. parameters:
  153. - in: path
  154. name: customerId
  155. required: true
  156. format: double
  157. type: number
  158. - in: body
  159. name: request
  160. required: true
  161. schema:
  162. $ref: '#/definitions/CustomerUpdateRequest'
  163. delete:
  164. operationId: Delete
  165. produces:
  166. - application/json
  167. responses:
  168. '204':
  169. description: No content
  170. description: 'Delete a user by customerId '
  171. security: []
  172. parameters:
  173. - in: path
  174. name: customerId
  175. required: true
  176. format: double
  177. type: number
  178. '/Customer/{customerId}/ccm':
  179. get:
  180. operationId: GetCustomerCCM
  181. produces:
  182. - application/json
  183. responses:
  184. '200':
  185. description: Ok
  186. schema:
  187. $ref: '#/definitions/CCM'
  188. description: 'Get customer CCM configuration by customerId '
  189. security: []
  190. parameters:
  191. - in: path
  192. name: customerId
  193. required: true
  194. format: double
  195. type: number
  196. patch:
  197. operationId: UpdateCustomerCCM
  198. produces:
  199. - application/json
  200. responses:
  201. '200':
  202. description: Ok
  203. schema:
  204. $ref: '#/definitions/Customer'
  205. description: 'Update customer CCM configuration by customerId '
  206. security: []
  207. parameters:
  208. - in: path
  209. name: customerId
  210. required: true
  211. format: double
  212. type: number
  213. - in: body
  214. name: request
  215. required: true
  216. schema:
  217. $ref: '#/definitions/CCM'
  218. delete:
  219. operationId: DeleteCustomerCCM
  220. produces:
  221. - application/json
  222. responses:
  223. '204':
  224. description: No content
  225. description: 'Delete customer CCM configuration by customerId '
  226. security: []
  227. parameters:
  228. - in: path
  229. name: customerId
  230. required: true
  231. format: double
  232. type: number
  233. '/Customer/{customerId}/association':
  234. get:
  235. operationId: GetCustomerAssociation
  236. produces:
  237. - application/json
  238. responses:
  239. '200':
  240. description: Ok
  241. schema:
  242. $ref: '#/definitions/CCM'
  243. description: 'Get customer associations configuration by customerId '
  244. security: []
  245. parameters:
  246. - in: path
  247. name: customerId
  248. required: true
  249. format: double
  250. type: number
  251. patch:
  252. operationId: UpdateCustomerAssociation
  253. produces:
  254. - application/json
  255. responses:
  256. '200':
  257. description: Ok
  258. schema:
  259. $ref: '#/definitions/Customer'
  260. description: 'Update customer associations configuration by customerId '
  261. security: []
  262. parameters:
  263. - in: path
  264. name: customerId
  265. required: true
  266. format: double
  267. type: number
  268. - in: body
  269. name: request
  270. required: true
  271. schema:
  272. $ref: '#/definitions/CCM'
  273. delete:
  274. operationId: DeleteCustomerAssociation
  275. produces:
  276. - application/json
  277. responses:
  278. '204':
  279. description: No content
  280. description: 'Delete customer associations configuration by customerId '
  281. security: []
  282. parameters:
  283. - in: path
  284. name: customerId
  285. required: true
  286. format: double
  287. type: number
  288. '/Customer/{customerId}/association/did/{did}':
  289. get:
  290. operationId: GetCustomerAssociationByDID
  291. produces:
  292. - application/json
  293. responses:
  294. '200':
  295. description: Ok
  296. schema:
  297. $ref: '#/definitions/CCM'
  298. description: 'Get customer association configuration by customerId and DID '
  299. security: []
  300. parameters:
  301. - in: path
  302. name: customerId
  303. required: true
  304. format: double
  305. type: number
  306. - in: path
  307. name: did
  308. required: true
  309. format: double
  310. type: number
  311. patch:
  312. operationId: UpdateCustomerAssociationByDID
  313. produces:
  314. - application/json
  315. responses:
  316. '200':
  317. description: Ok
  318. schema:
  319. $ref: '#/definitions/Customer'
  320. description: 'Update customer association configuration by customerId and DID '
  321. security: []
  322. parameters:
  323. - in: path
  324. name: customerId
  325. required: true
  326. format: double
  327. type: number
  328. - in: path
  329. name: did
  330. required: true
  331. format: double
  332. type: number
  333. - in: body
  334. name: request
  335. required: true
  336. schema:
  337. $ref: '#/definitions/CCM'
  338. delete:
  339. operationId: DeleteCustomerAssociationByDID
  340. produces:
  341. - application/json
  342. responses:
  343. '204':
  344. description: No content
  345. description: 'Delete customer association configuration by customerId and DID '
  346. security: []
  347. parameters:
  348. - in: path
  349. name: customerId
  350. required: true
  351. format: double
  352. type: number
  353. - in: path
  354. name: did
  355. required: true
  356. format: double
  357. type: number
  358. '/Customer/{customerId}/association/ext/{ext}':
  359. get:
  360. operationId: GetCustomerAssociationByExtension
  361. produces:
  362. - application/json
  363. responses:
  364. '200':
  365. description: Ok
  366. schema:
  367. $ref: '#/definitions/CCM'
  368. description: 'Get customer association configuration by customerId and Unigy extension '
  369. security: []
  370. parameters:
  371. - in: path
  372. name: customerId
  373. required: true
  374. format: double
  375. type: number
  376. - in: path
  377. name: ext
  378. required: true
  379. format: double
  380. type: number
  381. patch:
  382. operationId: UpdateCustomerAssociationByExtension
  383. produces:
  384. - application/json
  385. responses:
  386. '200':
  387. description: Ok
  388. schema:
  389. $ref: '#/definitions/Customer'
  390. description: 'Update customer association configuration by customerId and Unigy extension '
  391. security: []
  392. parameters:
  393. - in: path
  394. name: customerId
  395. required: true
  396. format: double
  397. type: number
  398. - in: path
  399. name: ext
  400. required: true
  401. format: double
  402. type: number
  403. - in: body
  404. name: request
  405. required: true
  406. schema:
  407. $ref: '#/definitions/CCM'
  408. delete:
  409. operationId: DeleteCustomerAssociationByExtension
  410. produces:
  411. - application/json
  412. responses:
  413. '204':
  414. description: No content
  415. description: 'Delete customer association configuration by customerId and Unigy extension '
  416. security: []
  417. parameters:
  418. - in: path
  419. name: customerId
  420. required: true
  421. format: double
  422. type: number
  423. - in: path
  424. name: ext
  425. required: true
  426. format: double
  427. type: number
  428. produces:
  429. - application/json
  430. swagger: '2.0'
  431. securityDefinitions: {}
  432. host: 'localhost:3000'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement