Advertisement
Guest User

for paul

a guest
Feb 17th, 2020
579
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.60 KB | None | 0 0
  1. openapi: 3.0.1
  2. info:
  3. title: keugsapis
  4. description: keugsapis definitions
  5. contact:
  6. email: dwokoma@vasconsolutions.com
  7. license:
  8. name: Apache 2.0
  9. url: http://www.apache.org/licenses/LICENSE-2.0.html
  10. version: 1.0.0
  11. servers:
  12. - url: http://localhost:8080/
  13. description: SwaggerHub API Auto Mocking
  14. tags:
  15. - name: Customer
  16. description: Information about a Customer
  17. externalDocs:
  18. description: Proto files here
  19. url: https://gitlab.com/keugs/keugs-customer-service
  20. - name: User
  21. description: Information about a User
  22. externalDocs:
  23. description: Proto files here
  24. url: https://gitlab..com/keugs/keugs-user-service
  25. - name: Delivery
  26. externalDocs:
  27. description: Information about a Delivery
  28. url: https://gitlab.com/keugs/keugs-delivery-service
  29.  
  30. paths:
  31. /delivery/:
  32. post:
  33. tags:
  34. - Delivery
  35. summary: Add a new delivery to the database
  36. operationId: addDelivery
  37. requestBody:
  38. x-name: body
  39. content:
  40. application/json:
  41. schema:
  42. type: object
  43. properties:
  44. delivery:
  45. $ref: '#/components/schemas/Delivery'
  46. responses:
  47. "405":
  48. description: Invalid input
  49. security:
  50. - service_auth:
  51. - write:delivery
  52. - read:delivery
  53. x-swagger-router-controller: Delivery
  54. /category/:
  55. post:
  56. tags:
  57. - Category
  58. summary: Add a new category
  59. operationId: addCategory
  60. requestBody:
  61. x-name: body
  62. content:
  63. application/json:
  64. schema:
  65. type: object
  66. properties:
  67. category:
  68. $ref: '#/components/schemas/Category'
  69. responses:
  70. "405":
  71. description: Invalid input
  72. security:
  73. - service_auth:
  74. - write:category
  75. - read:category
  76. x-swagger-router-controller: Category
  77. /category/{categoryId}:
  78. put:
  79. tags:
  80. - Category
  81. summary: Update an existing category
  82. operationId: updateCategory
  83. parameters:
  84. - name: categoryId
  85. in: path
  86. description: ID of category to update
  87. required: true
  88. style: simple
  89. explode: false
  90. schema:
  91. type: integer
  92. format: int32
  93. requestBody:
  94. x-name: body
  95. content:
  96. application/json:
  97. schema:
  98. type: object
  99. properties:
  100. category:
  101. $ref: '#/components/schemas/Category'
  102. update_mask:
  103. $ref: '#/components/schemas/UpdateMask'
  104. responses:
  105. "400":
  106. description: Invalid ID supplied
  107. "404":
  108. description: Category not found
  109. "405":
  110. description: Validation exception
  111. security:
  112. - service_auth:
  113. - write:category
  114. - read:category
  115. x-swagger-router-controller: Category
  116. get:
  117. tags:
  118. - Category
  119. summary: Find category by ID
  120. description: Returns a single category
  121. operationId: getCategoryById
  122. parameters:
  123. - name: categoryId
  124. in: path
  125. description: ID of category to return
  126. required: true
  127. style: simple
  128. explode: false
  129. schema:
  130. type: integer
  131. format: int32
  132. responses:
  133. "200":
  134. description: successful operation
  135. content:
  136. application/json:
  137. schema:
  138. $ref: '#/components/schemas/Category'
  139. "400":
  140. description: Invalid ID supplied
  141. "404":
  142. description: Category not found
  143. security:
  144. - api_key: []
  145. x-swagger-router-controller: Category
  146. delete:
  147. tags:
  148. - Category
  149. summary: Delete category by ID
  150. operationId: deleteCategory
  151. parameters:
  152. - name: api_key
  153. in: header
  154. required: false
  155. style: simple
  156. explode: false
  157. schema:
  158. type: string
  159. - name: categoryId
  160. in: path
  161. description: Id of the category that needs to be deleted
  162. required: true
  163. style: simple
  164. explode: false
  165. schema:
  166. type: integer
  167. format: int32
  168. responses:
  169. "200":
  170. description: successful operation
  171. content:
  172. application/json:
  173. schema:
  174. $ref: '#/components/schemas/Category'
  175. "400":
  176. description: Invalid ID supplied
  177. "404":
  178. description: Category not found
  179. security:
  180. - service_auth:
  181. - write:category
  182. - read:category
  183. x-swagger-router-controller: Category
  184. /item/:
  185. post:
  186. tags:
  187. - Item
  188. summary: Add a new item
  189. operationId: addItem
  190. requestBody:
  191. x-name: body
  192. content:
  193. application/json:
  194. schema:
  195. type: object
  196. properties:
  197. item:
  198. $ref: '#/components/schemas/Item'
  199. responses:
  200. "405":
  201. description: Invalid input
  202. security:
  203. - service_auth:
  204. - write:item
  205. - read:item
  206. x-swagger-router-controller: Item
  207. /item/{itemId}:
  208. put:
  209. tags:
  210. - Item
  211. summary: Update an existing Item
  212. operationId: updateItem
  213. parameters:
  214. - name: itemId
  215. in: path
  216. description: ID of item to update
  217. required: true
  218. style: simple
  219. explode: false
  220. schema:
  221. type: integer
  222. format: int32
  223. requestBody:
  224. x-name: body
  225. content:
  226. application/json:
  227. schema:
  228. type: object
  229. properties:
  230. customer:
  231. $ref: '#/components/schemas/Item'
  232. update_mask:
  233. $ref: '#/components/schemas/UpdateMask'
  234. responses:
  235. "400":
  236. description: Invalid ID supplied
  237. "404":
  238. description: Item not found
  239. "405":
  240. description: Validation exception
  241. security:
  242. - service_auth:
  243. - write:item
  244. - read:item
  245. x-swagger-router-controller: Item
  246. get:
  247. tags:
  248. - Item
  249. summary: Find item by ID
  250. description: Returns a single item
  251. operationId: getItemById
  252. parameters:
  253. - name: itemId
  254. in: path
  255. description: ID of item to return
  256. required: true
  257. style: simple
  258. explode: false
  259. schema:
  260. type: integer
  261. format: int32
  262. responses:
  263. "200":
  264. description: successful operation
  265. content:
  266. application/json:
  267. schema:
  268. $ref: '#/components/schemas/Item'
  269. "400":
  270. description: Invalid ID supplied
  271. "404":
  272. description: Item not found
  273. security:
  274. - api_key: []
  275. x-swagger-router-controller: Item
  276. delete:
  277. tags:
  278. - Item
  279. summary: Delete item by ID
  280. operationId: deleteItem
  281. parameters:
  282. - name: api_key
  283. in: header
  284. required: false
  285. style: simple
  286. explode: false
  287. schema:
  288. type: string
  289. - name: itemId
  290. in: path
  291. description: Id of the item that needs to be deleted
  292. required: true
  293. style: simple
  294. explode: false
  295. schema:
  296. type: integer
  297. format: int32
  298. responses:
  299. "200":
  300. description: successful operation
  301. content:
  302. application/json:
  303. schema:
  304. $ref: '#/components/schemas/Item'
  305. "400":
  306. description: Invalid ID supplied
  307. "404":
  308. description: Item not found
  309. security:
  310. - service_auth:
  311. - write:item
  312. - read:item
  313. x-swagger-router-controller: Item
  314. /store/:
  315. post:
  316. tags:
  317. - Store
  318. summary: Add a new store
  319. operationId: addStore
  320. requestBody:
  321. x-name: body
  322. content:
  323. application/json:
  324. schema:
  325. type: object
  326. properties:
  327. store:
  328. $ref: '#/components/schemas/Store'
  329. responses:
  330. "405":
  331. description: Invalid input
  332. security:
  333. - service_auth:
  334. - write:store
  335. - read:store
  336. x-swagger-router-controller: Store
  337. /store/{storeId}:
  338. put:
  339. tags:
  340. - Store
  341. summary: Update an existing store
  342. operationId: updateStore
  343. parameters:
  344. - name: storeId
  345. in: path
  346. description: ID of store to update
  347. required: true
  348. style: simple
  349. explode: false
  350. schema:
  351. type: integer
  352. format: int32
  353. requestBody:
  354. x-name: body
  355. content:
  356. application/json:
  357. schema:
  358. type: object
  359. properties:
  360. customer:
  361. $ref: '#/components/schemas/Store'
  362. update_mask:
  363. $ref: '#/components/schemas/UpdateMask'
  364. responses:
  365. "400":
  366. description: Invalid ID supplied
  367. "404":
  368. description: Store not found
  369. "405":
  370. description: Validation exception
  371. security:
  372. - service_auth:
  373. - write:store
  374. - read:store
  375. x-swagger-router-controller: Store
  376. get:
  377. tags:
  378. - Store
  379. summary: Find store by ID
  380. description: Returns a single store
  381. operationId: getStoreById
  382. parameters:
  383. - name: storeId
  384. in: path
  385. description: ID of store to return
  386. required: true
  387. style: simple
  388. explode: false
  389. schema:
  390. type: integer
  391. format: int32
  392. responses:
  393. "200":
  394. description: successful operation
  395. content:
  396. application/json:
  397. schema:
  398. $ref: '#/components/schemas/Store'
  399. "400":
  400. description: Invalid ID supplied
  401. "404":
  402. description: Store not found
  403. security:
  404. - api_key: []
  405. x-swagger-router-controller: Store
  406. delete:
  407. tags:
  408. - Store
  409. summary: Delete store by ID
  410. operationId: deleteStore
  411. parameters:
  412. - name: api_key
  413. in: header
  414. required: false
  415. style: simple
  416. explode: false
  417. schema:
  418. type: string
  419. - name: storeId
  420. in: path
  421. description: Id of the store that needs to be deleted
  422. required: true
  423. style: simple
  424. explode: false
  425. schema:
  426. type: integer
  427. format: int32
  428. responses:
  429. "200":
  430. description: successful operation
  431. content:
  432. application/json:
  433. schema:
  434. $ref: '#/components/schemas/Store'
  435. "400":
  436. description: Invalid ID supplied
  437. "404":
  438. description: Strore not found
  439. security:
  440. - service_auth:
  441. - write:store
  442. - read:store
  443. x-swagger-router-controller: Store
  444. /vehicle/:
  445. post:
  446. tags:
  447. - Vehicle
  448. summary: Add a new vehicle
  449. operationId: addVehicle
  450. requestBody:
  451. x-name: body
  452. content:
  453. application/json:
  454. schema:
  455. type: object
  456. properties:
  457. vehicle:
  458. $ref: '#/components/schemas/Vehicle'
  459. responses:
  460. "405":
  461. description: Invalid input
  462. security:
  463. - service_auth:
  464. - write:vehicle
  465. - read:vehicle
  466. x-swagger-router-controller: Vehicle
  467. put:
  468. tags:
  469. - Vehicle
  470. summary: Update an existing vehicle
  471. operationId: updateVehicle
  472. parameters:
  473. - name: vehicleId
  474. in: path
  475. description: ID of vehicle to update
  476. required: true
  477. style: simple
  478. explode: false
  479. schema:
  480. type: integer
  481. format: int32
  482. requestBody:
  483. x-name: body
  484. content:
  485. application/json:
  486. schema:
  487. type: object
  488. properties:
  489. customer:
  490. $ref: '#/components/schemas/Vehicle'
  491. update_mask:
  492. $ref: '#/components/schemas/UpdateMask'
  493. responses:
  494. "400":
  495. description: Invalid ID supplied
  496. "404":
  497. description: Vehicle not found
  498. "405":
  499. description: Validation exception
  500. security:
  501. - service_auth:
  502. - write:vehicle
  503. - read:vehicle
  504. x-swagger-router-controller: Vehicle
  505. get:
  506. tags:
  507. - Vehicle
  508. summary: Find vehicle by ID
  509. description: Returns a single vehicle
  510. operationId: getVehicleById
  511. parameters:
  512. - name: vehicleId
  513. in: path
  514. description: ID of vehicle to return
  515. required: true
  516. style: simple
  517. explode: false
  518. schema:
  519. type: integer
  520. format: int32
  521. responses:
  522. "200":
  523. description: successful operation
  524. content:
  525. application/json:
  526. schema:
  527. $ref: '#/components/schemas/Vehicle'
  528. "400":
  529. description: Invalid ID supplied
  530. "404":
  531. description: Vehicle not found
  532. security:
  533. - api_key: []
  534. x-swagger-router-controller: Vehicle
  535. delete:
  536. tags:
  537. - Vehicle
  538. summary: Delete vehicle by ID
  539. operationId: deleteVehicle
  540. parameters:
  541. - name: api_key
  542. in: header
  543. required: false
  544. style: simple
  545. explode: false
  546. schema:
  547. type: string
  548. - name: vehicleId
  549. in: path
  550. description: Id of the vehicle that needs to be deleted
  551. required: true
  552. style: simple
  553. explode: false
  554. schema:
  555. type: integer
  556. format: int32
  557. responses:
  558. "200":
  559. description: successful operation
  560. content:
  561. application/json:
  562. schema:
  563. $ref: '#/components/schemas/Vehicle'
  564. "400":
  565. description: Invalid ID supplied
  566. "404":
  567. description: Vehicle not found
  568. security:
  569. - service_auth:
  570. - write:vehicle
  571. - read:vehicle
  572. x-swagger-router-controller: Vehicle
  573. /customer/:
  574. post:
  575. tags:
  576. - Customer
  577. summary: Add a new customer to the database
  578. operationId: addCustomer
  579. requestBody:
  580. x-name: body
  581. content:
  582. application/json:
  583. schema:
  584. type: object
  585. properties:
  586. customer:
  587. $ref: '#/components/schemas/Customer'
  588. responses:
  589. "405":
  590. description: Invalid input
  591. security:
  592. - service_auth:
  593. - write:customers
  594. - read:customers
  595. x-swagger-router-controller: Customer
  596. /customer/findByQuery:
  597. post:
  598. tags:
  599. - Customer
  600. summary: Find Customers based on query
  601. description: Multiple customers return based on query supplied
  602. operationId: findCustomers
  603. requestBody:
  604. $ref: '#/components/requestBodies/Query'
  605. responses:
  606. "200":
  607. description: successful operation
  608. content:
  609. application/json:
  610. schema:
  611. type: array
  612. items:
  613. $ref: '#/components/schemas/Customer'
  614. x-content-type: application/json
  615. "400":
  616. description: Invalid tag value
  617. security:
  618. - service_auth:
  619. - write:customers
  620. - 'read: customers'
  621. x-swagger-router-controller: Customer
  622. /customer/{customerId}:
  623. put:
  624. tags:
  625. - Customer
  626. summary: Update an existing customer
  627. operationId: updateCustomer
  628. parameters:
  629. - name: customerId
  630. in: path
  631. description: ID of customer to update
  632. required: true
  633. style: simple
  634. explode: false
  635. schema:
  636. type: integer
  637. format: int32
  638. requestBody:
  639. x-name: body
  640. content:
  641. application/json:
  642. schema:
  643. type: object
  644. properties:
  645. customer:
  646. $ref: '#/components/schemas/Customer'
  647. update_mask:
  648. $ref: '#/components/schemas/UpdateMask'
  649. responses:
  650. "400":
  651. description: Invalid ID supplied
  652. "404":
  653. description: Customer not found
  654. "405":
  655. description: Validation exception
  656. security:
  657. - service_auth:
  658. - write:customers
  659. - read:customers
  660. x-swagger-router-controller: Customer
  661. get:
  662. tags:
  663. - Customer
  664. summary: Find customer by ID
  665. description: Returns a single customer
  666. operationId: getCustomerById
  667. parameters:
  668. - name: customerId
  669. in: path
  670. description: ID of customer to return
  671. required: true
  672. style: simple
  673. explode: false
  674. schema:
  675. type: integer
  676. format: int32
  677. responses:
  678. "200":
  679. description: successful operation
  680. content:
  681. application/json:
  682. schema:
  683. $ref: '#/components/schemas/Customer'
  684. "400":
  685. description: Invalid ID supplied
  686. "404":
  687. description: Customer not found
  688. security:
  689. - api_key: []
  690. x-swagger-router-controller: Customer
  691. delete:
  692. tags:
  693. - Customer
  694. summary: Delete customer by ID
  695. operationId: deleteCustomer
  696. parameters:
  697. - name: api_key
  698. in: header
  699. required: false
  700. style: simple
  701. explode: false
  702. schema:
  703. type: string
  704. - name: customerId
  705. in: path
  706. description: Id of the customer that needs to be deleted
  707. required: true
  708. style: simple
  709. explode: false
  710. schema:
  711. type: integer
  712. format: int32
  713. responses:
  714. "200":
  715. description: successful operation
  716. content:
  717. application/json:
  718. schema:
  719. $ref: '#/components/schemas/Customer'
  720. "400":
  721. description: Invalid ID supplied
  722. "404":
  723. description: Customer not found
  724. security:
  725. - service_auth:
  726. - write:customers
  727. - read:customers
  728. x-swagger-router-controller: Customer
  729. /user/:
  730. post:
  731. tags:
  732. - User
  733. summary: Add a new user to the database
  734. operationId: addUser
  735. requestBody:
  736. x-name: body
  737. content:
  738. application/json:
  739. schema:
  740. type: object
  741. properties:
  742. user:
  743. $ref: '#/components/schemas/User'
  744. responses:
  745. "201":
  746. description: Created
  747. "405":
  748. description: Invalid input
  749. security:
  750. - service_auth:
  751. - 'write: users'
  752. - 'read: users'
  753. x-swagger-router-controller: User
  754. /user/findByQuery:
  755. post:
  756. tags:
  757. - User
  758. summary: Find Users based on query
  759. description: Multiple users return based on query supplied
  760. operationId: findUsers
  761. parameters:
  762. - name: tags
  763. in: query
  764. description: Tags to filter by
  765. required: true
  766. style: form
  767. explode: true
  768. schema:
  769. type: array
  770. items:
  771. type: string
  772. responses:
  773. "200":
  774. description: successful operation
  775. content:
  776. application/json:
  777. schema:
  778. type: array
  779. items:
  780. $ref: '#/components/schemas/User'
  781. x-content-type: application/json
  782. "400":
  783. description: Invalid tag value
  784. security:
  785. - service_auth:
  786. - write:customers
  787. - 'read: customers'
  788. x-swagger-router-controller: User
  789. /user/{userId}:
  790. put:
  791. tags:
  792. - User
  793. summary: Update an existing user
  794. operationId: updateUser
  795. parameters:
  796. - name: userId
  797. in: path
  798. description: ID of user to update
  799. required: true
  800. style: simple
  801. explode: false
  802. schema:
  803. type: integer
  804. format: int32
  805. requestBody:
  806. x-name: body
  807. content:
  808. application/json:
  809. schema:
  810. type: object
  811. properties:
  812. user:
  813. $ref: '#/components/schemas/User'
  814. update_mask:
  815. $ref: '#/components/schemas/UpdateMask'
  816. responses:
  817. "400":
  818. description: Invalid ID supplied
  819. "404":
  820. description: User not found
  821. "405":
  822. description: Validation exception
  823. security:
  824. - service_auth:
  825. - 'write: users'
  826. - 'read: users'
  827. x-swagger-router-controller: User
  828. get:
  829. tags:
  830. - User
  831. summary: Find user by ID
  832. description: Returns a single user
  833. operationId: getUserById
  834. parameters:
  835. - name: userId
  836. in: path
  837. description: ID of user to return
  838. required: true
  839. style: simple
  840. explode: false
  841. schema:
  842. type: integer
  843. format: int32
  844. responses:
  845. "200":
  846. description: successful operation
  847. content:
  848. application/json:
  849. schema:
  850. $ref: '#/components/schemas/Customer'
  851. "400":
  852. description: Invalid ID supplied
  853. "404":
  854. description: User not found
  855. security:
  856. - api_key: []
  857. x-swagger-router-controller: User
  858. delete:
  859. tags:
  860. - User
  861. summary: Delete user by ID
  862. operationId: deleteUser
  863. parameters:
  864. - name: api_key
  865. in: header
  866. required: false
  867. style: simple
  868. explode: false
  869. schema:
  870. type: string
  871. - name: userId
  872. in: path
  873. description: Id of the user that needs to be deleted
  874. required: true
  875. style: simple
  876. explode: false
  877. schema:
  878. minimum: 1
  879. type: integer
  880. format: int32
  881. responses:
  882. "400":
  883. description: Invalid ID supplied
  884. "404":
  885. description: User not found
  886. security:
  887. - service_auth:
  888. - write:users
  889. - read:users
  890. x-swagger-router-controller: User
  891.  
  892. components:
  893. schemas:
  894. UpdateCustomer:
  895. type: object
  896. properties:
  897. customer:
  898. $ref: '#/components/schemas/Customer'
  899. update_mask:
  900. $ref: '#/components/schemas/UpdateMask'
  901. Projection:
  902. type: object
  903. properties:
  904. name:
  905. type: string
  906. KindExpression:
  907. type: object
  908. properties:
  909. name:
  910. type: string
  911. PropertyFilter:
  912. type: object
  913. properties:
  914. Operator:
  915. type: array
  916. items:
  917. type: string
  918. enum:
  919. - OPERATOR_UNSPECIFIED
  920. - LESS_THAN
  921. - LESS_THAN_OR_EQUAL
  922. - GREATER_THAN
  923. - GREATER_THAN_OR_EQUAL
  924. - EQUAL
  925. - LIKE
  926. - HAS_ANCESTOR
  927. property:
  928. $ref: '#/components/schemas/PropertyReference'
  929. op:
  930. $ref: '#/components/schemas/PropertyFilter/properties/Operator'
  931. value:
  932. type: string
  933. PropertyOrder:
  934. type: object
  935. properties:
  936. Direction:
  937. type: array
  938. items:
  939. type: string
  940. enum:
  941. - DIRECTION_UNSPECIFIED
  942. - ASCENDING
  943. - DESCENDING
  944. property:
  945. $ref: '#/components/schemas/PropertyReference'
  946. direction:
  947. $ref: '#/components/schemas/PropertyOrder/properties/Direction'
  948. PropertyReference:
  949. type: object
  950. properties:
  951. name:
  952. type: string
  953. UpdateMask:
  954. type: array
  955. items:
  956. type: string
  957.  
  958. Query:
  959. type: object
  960. properties:
  961. projection:
  962. type: array
  963. items:
  964. $ref: '#/components/schemas/Projection'
  965. kind:
  966. type: array
  967. items:
  968. $ref: '#/components/schemas/KindExpression'
  969. filter:
  970. type: array
  971. items:
  972. $ref: '#/components/schemas/PropertyFilter'
  973. order:
  974. type: array
  975. items:
  976. $ref: '#/components/schemas/PropertyOrder'
  977. distinct_on:
  978. type: array
  979. items:
  980. $ref: '#/components/schemas/PropertyReference'
  981. start_cursor:
  982. type: integer
  983. format: int32
  984. end_cursor:
  985. type: integer
  986. format: int32
  987. offset:
  988. type: integer
  989. format: int32
  990. limit:
  991. type: integer
  992. format: int32
  993. Customer:
  994. type: object
  995. properties:
  996. id:
  997. type: integer
  998. format: int64
  999. first_name:
  1000. type: string
  1001. last_name:
  1002. type: string
  1003. mobile_no:
  1004. type: string
  1005. email_address:
  1006. type: string
  1007. address_line:
  1008. type: string
  1009. location:
  1010. $ref: '#/components/schemas/Location'
  1011. created_by:
  1012. type: string
  1013. format: date-time
  1014. updated_at:
  1015. type: string
  1016. format: date-time
  1017. delete_by:
  1018. type: integer
  1019. format: int32
  1020. deleted_at:
  1021. type: string
  1022. format: date-time
  1023. Category:
  1024. type: object
  1025. properties:
  1026. id:
  1027. type: integer
  1028. format: int32
  1029. name:
  1030. type: string
  1031. assigned_to:
  1032. $ref: '#/components/schemas/AssignedTo'
  1033. created_by:
  1034. type: integer
  1035. format: int32
  1036. created_at:
  1037. type: string
  1038. format: date-time
  1039. updated_at:
  1040. type: string
  1041. format: date-time
  1042. deleted_by:
  1043. type: integer
  1044. format: date-time
  1045. Item:
  1046. type: object
  1047. properties:
  1048. id:
  1049. type: integer
  1050. format: int32
  1051. name:
  1052. type: string
  1053. category_id:
  1054. type: integer
  1055. format: int32
  1056. price:
  1057. type: number
  1058. format: double
  1059. sku:
  1060. type: string
  1061. weight:
  1062. type: number
  1063. format: double
  1064. height:
  1065. type: number
  1066. format: double
  1067. width:
  1068. type: number
  1069. format: double
  1070. assigned_to:
  1071. $ref: '#/components/schemas/AssignedTo'
  1072. created_by:
  1073. type: integer
  1074. format: int32
  1075. created_at:
  1076. type: string
  1077. format: date-time
  1078. updated_at:
  1079. type: string
  1080. format: date-time
  1081. deleted_by:
  1082. type: integer
  1083. format: date-time
  1084. StoreType:
  1085. type: string
  1086. enum:
  1087. - unknown
  1088. - stand_alone_store
  1089. - in_mail_store
  1090. - consolidation_store
  1091. - others
  1092. VehicleType:
  1093. type: string
  1094. enum:
  1095. - vehicle_unspecified
  1096. - motorcycle
  1097. - car
  1098. - truck
  1099. Vehicle:
  1100. type: object
  1101. properties:
  1102. id:
  1103. type: integer
  1104. format: int32
  1105. vehicle_type:
  1106. $ref: '#/components/schemas/VehicleType'
  1107. vehicle_make:
  1108. type: string
  1109. vehicle_model:
  1110. type: string
  1111. vehicle_color:
  1112. type: string
  1113. vehicle_year:
  1114. type: integer
  1115. format: int32
  1116. user_id:
  1117. type: integer
  1118. format: int32
  1119. workspace_id:
  1120. type: integer
  1121. format: int32
  1122. photo_url:
  1123. type: string
  1124. assigned_to:
  1125. $ref: '#/components/schemas/AssignedTo'
  1126. created_by:
  1127. type: integer
  1128. format: int32
  1129. created_at:
  1130. type: string
  1131. format: date-time
  1132. updated_at:
  1133. type: string
  1134. format: date-time
  1135. deleted_by:
  1136. type: integer
  1137. format: date-time
  1138. Store:
  1139. type: object
  1140. properties:
  1141. id:
  1142. type: integer
  1143. format: int32
  1144. name:
  1145. type: string
  1146. store_type:
  1147. $ref: '#/components/schemas/StoreType'
  1148. phone_number:
  1149. type: string
  1150. address_line:
  1151. type: string
  1152. location:
  1153. type: array
  1154. items:
  1155. $ref: '#/components/schemas/Location'
  1156. offers_delivery:
  1157. type: boolean
  1158. assigned_to:
  1159. $ref: '#/components/schemas/AssignedTo'
  1160. created_by:
  1161. type: integer
  1162. format: int32
  1163. created_at:
  1164. type: string
  1165. format: date-time
  1166. updated_at:
  1167. type: string
  1168. format: date-time
  1169. deleted_by:
  1170. type: integer
  1171. format: date-time
  1172. Delivery:
  1173. type: object
  1174. properties:
  1175. id:
  1176. type: integer
  1177. format: int32
  1178. order_reference_no:
  1179. type: string
  1180. items:
  1181. type: array
  1182. items:
  1183. $ref: '#/components/schemas/Delivery'
  1184. delivery_status:
  1185. $ref: '#/components/schemas/DeliveryStatus'
  1186. store_id:
  1187. type: integer
  1188. format: int32
  1189. customer_id:
  1190. type: integer
  1191. format: int32
  1192. expected_pickup_time:
  1193. type: string
  1194. format: date-time
  1195. expected_delivery_time:
  1196. type: string
  1197. format: date-time
  1198. actual_pickup_time:
  1199. type: string
  1200. format: date-time
  1201. actual_delivery_time:
  1202. type: string
  1203. format: date-time
  1204. customer_signature_type:
  1205. $ref: '#/components/schemas/CustomerSignatureType'
  1206. sign_off:
  1207. type: string
  1208. #create object for vehicle type, this is wrong
  1209. vehicle_type:
  1210. type: string
  1211. driver:
  1212. type: integer
  1213. format: int32
  1214. required_age:
  1215. type: integer
  1216. workspace_id:
  1217. type: integer
  1218. format: int32
  1219. amount:
  1220. type: integer
  1221. format: int32
  1222. assigned_to:
  1223. $ref: '#/components/schemas/AssignedTo'
  1224. created_by:
  1225. type: integer
  1226. format: int32
  1227. created_at:
  1228. type: string
  1229. format: date-time
  1230. updated_at:
  1231. type: string
  1232. format: date-time
  1233. deleted_by:
  1234. type: integer
  1235. format: date-time
  1236. #put this back under Delivery
  1237. CustomerSignatureType:
  1238. type: string
  1239. enum:
  1240. - type_unspecified
  1241. - recipient_signature
  1242. - any_signature
  1243. - leave_at_door
  1244. #put this back under Delivery
  1245. DeliveryStatus:
  1246. type: string
  1247. enum:
  1248. - status_unspecified
  1249. - created
  1250. - pending_delivery_time
  1251. - assigned
  1252. - pending_pickup
  1253. - in_transit
  1254. - delivered
  1255. - canceled
  1256. - returned
  1257. User:
  1258. type: object
  1259. properties:
  1260. id:
  1261. type: integer
  1262. format: int32
  1263. username:
  1264. type: string
  1265. password:
  1266. type: string
  1267. workspace_id:
  1268. type: integer
  1269. format: int32
  1270. first_name:
  1271. type: string
  1272. middle_name:
  1273. type: string
  1274. fire_base_token:
  1275. type: string
  1276. last_name:
  1277. type: string
  1278. gender:
  1279. type: string
  1280. enum:
  1281. - male
  1282. - female
  1283. - other
  1284. user_type:
  1285. type: string
  1286. avatar:
  1287. type: string
  1288. permissions:
  1289. type: object
  1290. address_id:
  1291. type: integer
  1292. format: int32
  1293. assinged_to:
  1294. $ref: '#/components/schemas/AssignedTo'
  1295. mobile_no:
  1296. type: string
  1297. email:
  1298. type: string
  1299. address_line:
  1300. type: string
  1301. location:
  1302. type: array
  1303. items:
  1304. $ref: '#/components/schemas/Location'
  1305. last_login:
  1306. type: string
  1307. format: date-time
  1308. created_by:
  1309. type: string
  1310. format: date-time
  1311. updated_at:
  1312. type: string
  1313. format: date-time
  1314. delete_by:
  1315. type: integer
  1316. format: int32
  1317. deleted_at:
  1318. type: string
  1319. format: date-time
  1320. Location:
  1321. type: object
  1322. properties:
  1323. latitude:
  1324. type: number
  1325. format: double
  1326. longitude:
  1327. type: number
  1328. format: double
  1329. AssignedTo:
  1330. type: object
  1331. properties:
  1332. id:
  1333. type: integer
  1334. format: int32
  1335. created_at:
  1336. type: string
  1337. format: date-time
  1338. requestBodies:
  1339. UpdateCustomer:
  1340. content:
  1341. application/json:
  1342. schema:
  1343. $ref: '#/components/schemas/UpdateCustomer'
  1344. Query:
  1345. content:
  1346. application/json:
  1347. schema:
  1348. $ref: '#/components/schemas/Query'
  1349. Customer:
  1350. description: List of customer object
  1351. content:
  1352. application/json:
  1353. schema:
  1354. type: array
  1355. items:
  1356. $ref: '#/components/schemas/Customer'
  1357. required: true
  1358. User:
  1359. description: List of user object
  1360. content:
  1361. application/json:
  1362. schema:
  1363. type: array
  1364. items:
  1365. $ref: '#/components/schemas/User'
  1366. required: true
  1367. securitySchemes:
  1368. service_auth:
  1369. type: oauth2
  1370. flows:
  1371. implicit:
  1372. authorizationUrl: http://petstore.swagger.io/oauth/dialog
  1373. scopes:
  1374. write:customers: modify customer
  1375. read:customers: read your customers
  1376. write:users: modify users
  1377. read:users: read your users
  1378. api_key:
  1379. type: apiKey
  1380. name: api_key
  1381. in: header
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement