Advertisement
Guest User

Untitled

a guest
Aug 27th, 2017
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 31.42 KB | None | 0 0
  1. swagger: '2.0'
  2. info:
  3.   title: Armário Virtual API
  4.   description: API dos serviços do sistema Armário Virtual
  5.   version: 0.0.1
  6. # during dev, should point to your local machine
  7. host: localhost:10010
  8. # basePath prefixes all resource paths
  9. basePath: /_aV
  10. #
  11. schemes:
  12.  # tip: remove http to make production-grade
  13.   - http
  14.   - https
  15. # format of bodies a client can send (Content-Type)
  16. consumes:
  17.  - application/json
  18. # format of the responses to the client (Accepts)
  19. produces:
  20.  - application/json
  21.  
  22. securityDefinitions:
  23.   basicAuth:
  24.     type: basic
  25.   OAuth2:
  26.     type: oauth2
  27.     flow: accessCode
  28.     authorizationUrl: https://example.com/oauth/authorize
  29.     tokenUrl: https://example.com/oauth/token
  30.     scopes:
  31.       read: Grants read access
  32.       write: Grants write access
  33.  
  34.  
  35. paths:
  36.   /m/user:
  37.     x-swagger-router-controller: User
  38.     post:
  39.       summary: Post a new user
  40.       operationId: createNewUser
  41.       description: Submit a new user to be saved
  42.       tags:
  43.        - user
  44.       #security:
  45.       #   - basicAuth: []
  46.       parameters:
  47.         - name: data
  48.           in: body
  49.           required: true
  50.           description: Basic data of new user
  51.           schema:
  52.             $ref: '#/definitions/basic_user'
  53.             #$ref: '#/definitions/client'
  54.       responses:
  55.         201:
  56.           description: Created confirmation
  57.           schema:
  58.             $ref: '#/definitions/basic_user'
  59.             #$ref: '#/definitions/client'
  60.  
  61.         409:
  62.           description: Must be sended when user email already exist
  63.         default:
  64.           description: Error
  65.  
  66.  
  67.   /m/user/{id}:
  68.     x-swagger-router-controller: User
  69.     get:
  70.       summary: Get user data
  71.       description: Return user data
  72.       operationId: getUserById
  73.       tags:
  74.        - user
  75.       #security: []
  76.       parameters:
  77.         - name: id
  78.           in: path
  79.           description: User id to get
  80.           type: string
  81.           required: true
  82.       responses:
  83.         200:
  84.           description: OK
  85.           schema:
  86.             $ref: '#/definitions/basic_user'
  87.             #$ref: '#/definitions/client'
  88.         404:
  89.           description: User not found
  90.         default:
  91.           description: ERROR
  92.     put:
  93.       summary: Edit an user
  94.       operationId: editUserById
  95.       description: Submit changes on user data
  96.       tags:
  97.        - user
  98.       #security:
  99.       #   - OAuth2: [write]
  100.       parameters:
  101.         - name: id
  102.           in: path
  103.           description: User id to edit
  104.           type: string
  105.           required: true
  106.         - name: data
  107.           in: body
  108.           description: Data to replace
  109.           schema:
  110.             properties:
  111.               username:
  112.                 type: string
  113.               email:
  114.                 type: string
  115.                 pattern: '^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]{2,62}$'
  116.               password:
  117.                 type: string
  118.                 format: password
  119.               contact:
  120.                 type: string
  121.       responses:
  122.         200:
  123.           description: Update confirmation
  124.           schema:
  125.             $ref: '#/definitions/basic_user'
  126.             #$ref: '#/definitions/client'
  127.         304:
  128.           description: Must be sended when some error was founded
  129.         default:
  130.           description: Error
  131.  
  132.   /m/user/{id}/address:
  133.     x-swagger-router-controller: User
  134.     get:
  135.       summary: Get user addresses
  136.       description: Provide all addresses of user
  137.       operationId: getUserAddresses
  138.       tags:
  139.        - user
  140.         - address
  141.       #security:
  142.       #  - OAuth2: [read]
  143.       parameters:
  144.         - name: id
  145.           in: path
  146.           description: User id to get all addresses
  147.           type: string
  148.           required: true
  149.       responses:
  150.         200:
  151.           description: OK
  152.           schema:
  153.             required:
  154.              - addresses
  155.             properties:
  156.               addresses:
  157.                 type: array
  158.                 items:
  159.                   $ref: '#/definitions/address'
  160.         default:
  161.           description: ERROR
  162.     post:
  163.       summary: Post a new user address
  164.       operationId: addUserAddress
  165.       description: Submit a new user address to be saved
  166.       tags:
  167.        - user
  168.         - address
  169.       #$security:
  170.       #   - OAuth2: [write]
  171.       parameters:
  172.         - name: id
  173.           in: path
  174.           description: User id edit
  175.           type: string
  176.           required: true
  177.         - name: data
  178.           in: body
  179.           required: true
  180.           description: Basic data of new user
  181.           schema:
  182.             $ref: '#/definitions/address'
  183.       responses:
  184.         201:
  185.           description: Created confirmation
  186.           schema:
  187.             required:
  188.              - addresses
  189.             properties:
  190.               addresses:
  191.                 type: array
  192.                 items:
  193.                   $ref: '#/definitions/address'
  194.         500:
  195.           description: Server error
  196.         default:
  197.           description: Error
  198.     delete:
  199.       summary: Delete a user address
  200.       operationId: deleteUserAddress
  201.       description: Submit changes on user address
  202.       tags:
  203.        - user
  204.         - address
  205.       #security:
  206.       #   - OAuth2: [write]
  207.       parameters:
  208.         - name: id
  209.           in: path
  210.           description: User id
  211.           type: string
  212.           required: true
  213.         - name: address_id
  214.           in: header
  215.           description: Address id
  216.           type: string
  217.           format: int32
  218.           required: true
  219.       responses:
  220.         200:
  221.           description: Delete confirmation
  222.           schema:
  223.             required:
  224.              - addresses
  225.             properties:
  226.               addresses:
  227.                 type: array
  228.                 items:
  229.                   $ref: '#/definitions/address'
  230.         default:
  231.           description: Error
  232.  
  233.   /m/user/{id}/address/{address_id}:
  234.     x-swagger-router-controller: User
  235.     put:
  236.       summary: Update a existing user address
  237.       operationId: editUserAddress
  238.       description: Submit data for update a existing address.
  239.       tags:
  240.        - user
  241.         - address
  242.       #$security:
  243.       #   - OAuth2: [write]
  244.       parameters:
  245.         - name: id
  246.           in: path
  247.           description: User id edit
  248.           type: string
  249.           required: true
  250.         - name: address_id
  251.           in: path
  252.           description: Address id
  253.           type: string
  254.           format: int32
  255.           required: true
  256.         - name: data
  257.           in: body
  258.           required: true
  259.           description: Basic data to update existing user address
  260.           schema:
  261.             $ref: '#/definitions/address'
  262.       responses:
  263.         200:
  264.           description: Updated confirmation
  265.           schema:
  266.             required:
  267.              - addresses
  268.             properties:
  269.               addresses:
  270.                 type: array
  271.                 items:
  272.                   $ref: '#/definitions/address'
  273.         500:
  274.           description: Server error
  275.         default:
  276.           description: Error
  277.  
  278.  
  279.  
  280.   /m/user/{id}/clothes:
  281.     x-swagger-router-controller: User
  282.     get:
  283.       summary: Get all user clothes informations
  284.       description: Provide all user clothes without images
  285.       operationId: getAllUserClothes
  286.       tags:
  287.        - user
  288.         - clothes
  289.       #security:
  290.       #  - OAuth2: [read]
  291.       parameters:
  292.         - name: id
  293.           in: path
  294.           description: User id to get all clothes
  295.           type: string
  296.           required: true
  297.       responses:
  298.         200:
  299.           description: OK
  300.           schema:
  301.             required:
  302.              - clothes
  303.             properties:
  304.               clothes:
  305.                 type: array
  306.                 items:
  307.                   type: object
  308.                   #$ref: '#/definitions/clothes'
  309.         default:
  310.           description: ERROR
  311.     post:
  312.       summary: Create a new user clothes without photos
  313.       description: Submit a new clothes to be saved
  314.       operationId: postNewClothes
  315.       tags:
  316.        - user
  317.         - clothes
  318.       #security:
  319.       #  - OAuth2: [write]
  320.       parameters:
  321.         - name: id
  322.           in: path
  323.           description: User id to associate
  324.           type: string
  325.           required: true
  326.         - name: data
  327.           in: body
  328.           description: Clothes data
  329.           required: true
  330.           schema:
  331.             type: object
  332.             properties:
  333.               type:
  334.                 type: string
  335.               brand:
  336.                 type: string
  337.               color:
  338.                 type: string
  339.               print:
  340.                 type: string
  341.               station:
  342.                 type: string
  343.               observations:
  344.                 type: array
  345.                 items:
  346.                   type: string
  347.       responses:
  348.         201:
  349.           description: OK
  350.           schema:
  351.             type: object
  352.             properties:
  353.               type:
  354.                 type: string
  355.               brand:
  356.                 type: string
  357.               color:
  358.                 type: string
  359.               print:
  360.                 type: string
  361.               station:
  362.                 type: string
  363.               observations:
  364.                 type: array
  365.                 items:
  366.                   type: string
  367.             #$ref: '#/definitions/clothes'
  368.         default:
  369.           description: ERROR
  370.  
  371.   /m/clothes/{clothes_id}:
  372.     x-swagger-router-controller: Clothes
  373.     get:
  374.       summary: Get a clothes
  375.       description: Return a clothes by id
  376.       operationId: getClothesById
  377.       tags:
  378.        - clothes
  379.       #security:
  380.       #  - OAuth2: [read]
  381.       parameters:
  382.         - name: clothes_id
  383.           in: path
  384.           description: Clothes id to get
  385.           type: string
  386.           required: true
  387.       responses:
  388.         200:
  389.           description: OK
  390.           schema:
  391.             type: object
  392.             #$ref: '#/definitions/clothes'
  393.     put:
  394.       summary: Update clothes
  395.       description: Update a clothes data. Every time this run, a new version of clothes is created and presisted a old version.
  396.       operationId: updateClothes
  397.       tags:
  398.        - clothes
  399.       #security:
  400.       #  - OAuth2: [write]
  401.       parameters:
  402.         - name: clothes_id
  403.           in: path
  404.           description: Clothes id to edit
  405.           type: string
  406.           required: true
  407.         - name: data
  408.           in: body
  409.           description: Clothes data
  410.           schema:
  411.             type: object
  412.             properties:
  413.               type:
  414.                 type: string
  415.               brand:
  416.                 type: string
  417.               color:
  418.                 type: string
  419.               print:
  420.                 type: string
  421.               station:
  422.                 type: string
  423.       responses:
  424.         200:
  425.           description: Update confirmation
  426.           schema:
  427.             type: object
  428.             #$ref: '#/definitions/clothes'
  429.         default:
  430.           description: ERROR
  431.  
  432.     delete:
  433.       summary: Disable a clothes
  434.       description: Disable a specified clothes. Blocking her to be consulted or edited
  435.       operationId: disableClothes
  436.       tags:
  437.        - clothes
  438.       #security:
  439.       #  - OAuth2: [write]
  440.       parameters:
  441.         - name: clothes_id
  442.           in: path
  443.           description: Clothes id to edit
  444.           type: string
  445.           required: true
  446.       responses:
  447.         200:
  448.           description: Delete confirmation
  449.           schema:
  450.             type: object
  451.         default:
  452.           description: ERROR
  453.  
  454.   /m/clothes/{clothes_id}/observation:
  455.     x-swagger-router-controller: Clothes
  456.     post:
  457.       summary: Create a new observation for an clothes
  458.       description: Receive a new clothes observation and response with a updated clothes
  459.       operationId: postClothesObservation
  460.       tags:
  461.        - clothes
  462.       #security:
  463.       #  - OAuth2: [write]
  464.       parameters:
  465.         - name: clothes_id
  466.           in: path
  467.           description: Clothes id to associate observation
  468.           type: string
  469.           required: true
  470.         - name: observations
  471.           in: body
  472.           description: New clothes observation
  473.           required: true
  474.           schema:
  475.             type: array
  476.             items:
  477.               type: string
  478.       responses:
  479.         200:
  480.           description: Update confirmation
  481.           schema:
  482.             type: object
  483.     delete:
  484.       summary: Remove clothes observation
  485.       description: Delete a clothes observation and response with a updated clothes
  486.       operationId: deleteClothesObservation
  487.       tags:
  488.        - clothes
  489.       security:
  490.         - OAuth2: [write]
  491.       parameters:
  492.         - name: clothes_id
  493.           in: path
  494.           description: Clothes id to associate observation
  495.           type: string
  496.           required: true
  497.         - name: observations
  498.           in: body
  499.           description: Index of all observations that will be deleted
  500.           required: true
  501.           schema:
  502.             type: array
  503.             items:
  504.               type: number
  505.       responses:
  506.         200:
  507.           description: Operation confirmation
  508.  
  509.   /m/clothes/{clothes_id}/photo:
  510.     x-swagger-router-controller: clothes
  511.     post:
  512.       summary: Receive a new clothes photo
  513.       description: Receive a new clothes photo and response with a updated clothes
  514.       operationId: postClothesPhoto
  515.       tags:
  516.        - clothes
  517.         - static files
  518.       security:
  519.         - OAuth2: [write]
  520.       consumes:
  521.        - multipart/form-data
  522.       parameters:
  523.         - name: clothes_id
  524.           in: path
  525.           description: Clothes id to associate photo
  526.           type: string
  527.           required: true
  528.         - type: file
  529.           in: formData
  530.           name: photo
  531.           description: Clothes compressed photo
  532.           required: true
  533.       responses:
  534.           200:
  535.             description: Post confirmation
  536.             schema:
  537.               $ref: '#/definitions/clothes'
  538.           default:
  539.             description: Error
  540.  
  541.   /m/clothes/{clothes_id}/photo/{index}:
  542.     x-swagger-router-controller: clothes
  543.     get:
  544.       summary: Provide a photo of specified clothes
  545.       description: Provide all user clothes without images
  546.       operationId: getClothesPhoto
  547.       tags:
  548.        - clothes
  549.         - static files
  550.       security:
  551.         - OAuth2: [read]
  552.       produces:
  553.        - multipart/form-data
  554.       parameters:
  555.         - name: clothes_id
  556.           in: path
  557.           description: Clothes id to get photo
  558.           type: string
  559.           required: true
  560.         - name: index
  561.           in: path
  562.           description: Photo index
  563.           type: number
  564.           format: int32
  565.           required: true
  566.       responses:
  567.         200:
  568.           description: OK
  569.           schema:
  570.             type: file
  571.         default:
  572.           description: ERROR
  573.     delete:
  574.       summary: Remove clothes photo
  575.       description: Delete a clothes photo and response with a updated clothes
  576.       operationId: deleteClothesPhoto
  577.       tags:
  578.        - clothes
  579.         - static files
  580.       security:
  581.         - OAuth2: [write]
  582.       parameters:
  583.         - name: clothes_id
  584.           in: path
  585.           description: Clothes id of associated photo
  586.           type: string
  587.           required: true
  588.         - name: index
  589.           in: path
  590.           description: Photo index to be excluded
  591.           type: string
  592.           required: true
  593.       responses:
  594.         200:
  595.           description: Operation confirmation
  596.           schema:
  597.             $ref: '#/definitions/clothes'
  598.  
  599.   /m/stores:
  600.     x-swagger-router-controller: store
  601.     get:
  602.       summary: Get all filtered stores
  603.       description: Get stores filtring by State, City and Franchise
  604.       operationId: getStoresByFilter
  605.       tags:
  606.        - stores
  607.       security:
  608.         - OAuth2: [read]
  609.       parameters:
  610.         - name: state
  611.           in: query
  612.           type: string
  613.           required: true
  614.           description: State of store
  615.         - name: city
  616.           in: query
  617.           type: string
  618.           required: true
  619.           description: City of store
  620.         - name: franchise_id
  621.           in: query
  622.           type: string
  623.           required: false
  624.           description: Franchise id
  625.       responses:
  626.         200:
  627.           description: OK
  628.           schema:
  629.             type: array
  630.             items:
  631.               type: object
  632.               properties:
  633.                 objectId:
  634.                   type: string
  635.                 name:
  636.                   type: string
  637.  
  638.   /m/stores/{store_id}/washebles:
  639.     x-swagger-router-controller: store
  640.     get:
  641.       summary: Get washebles of an store
  642.       description: Get all actives washebles of store
  643.       operationId: getWasheblesByStore
  644.       tags:
  645.        - stores
  646.       security:
  647.         - OAuth2: [read]
  648.       parameters:
  649.         - name: store_id
  650.           in: path
  651.           description: Store id for consult
  652.           type: string
  653.           required: true
  654.       responses:
  655.         200:
  656.           description: Operation confirmation
  657.           schema:
  658.             type: array
  659.             items:
  660.               type: object
  661.               properties:
  662.                 objectId:
  663.                   type: string
  664.                 name:
  665.                   type: string
  666.  
  667.   /m/stores/{store_id}/services:
  668.     x-swagger-router-controller: store
  669.     get:
  670.       summary: Get services ofered by an store
  671.       description: Get all activated services ofered by an store
  672.       operationId: getServicesByStore
  673.       tags:
  674.        - stores
  675.       security:
  676.         - OAuth2: [read]
  677.       parameters:
  678.         - name: store_id
  679.           in: path
  680.           description: Store id for consult
  681.           type: string
  682.           required: true
  683.       responses:
  684.         200:
  685.           description: Operation confirmation
  686.           schema:
  687.             $ref: '#/definitions/especial_service'
  688.  
  689.   /m/stores/{store_id}/order:
  690.     x-swagger-router-controller: store
  691.     post:
  692.       summary: Post new order to Store
  693.       description: Receive a new order from client. Process and send the order to respective store.
  694.       operationId: postNewOrderFromStore
  695.       tags:
  696.        - stores
  697.         - orders
  698.       security:
  699.         - OAuth2: [write]
  700.       parameters:
  701.         - name: store_id
  702.           in: path
  703.           description: Store id for associate order
  704.           type: string
  705.           required: true
  706.         - name: data
  707.           in: body
  708.           description: Order data
  709.           required: true
  710.           schema:
  711.             type: object
  712.             properties:
  713.               cart_itens:
  714.                 type: object
  715.                 properties:
  716.                   clothes_set:
  717.                     type: array
  718.                     description: Itens do pedido
  719.                     items:
  720.                       type: object
  721.                       properties:
  722.                         clothes:
  723.                           type: object
  724.                           description: Id e observações para a roupa
  725.                           properties:
  726.                             objectId:
  727.                               type: string
  728.                             observation:
  729.                               type: string
  730.                         whase_type:
  731.                           $ref: '#/definitions/basic_services'
  732.                   services:
  733.                     type: string
  734.       responses:
  735.           200:
  736.             description: Operation confirmation
  737.  
  738.   /m/stores/{store_id}/order/estimate:
  739.     x-swagger-router-controller: store
  740.     get:
  741.       summary: Get order estimate
  742.       description: Receive a clothes and pretend service from client to calculate the price of service
  743.       operationId: getOrderEstimate
  744.       tags:
  745.        - stores
  746.         - orders
  747.       security:
  748.         - OAuth2: [read]
  749.       parameters:
  750.         - name: store_id
  751.           in: path
  752.           description: Store id for associate order
  753.           type: string
  754.           required: true
  755.         - name: data
  756.           in: body
  757.           description: Order data
  758.           required: true
  759.           schema:
  760.             type: object
  761.             description: Id da roupa
  762.             properties:
  763.               objectId:
  764.                 type: string
  765.               whase_type:
  766.                 $ref: '#/definitions/basic_services'
  767.       responses:
  768.           200:
  769.             description: Operation confirmation
  770.             schema:
  771.               type: object
  772.               properties:
  773.                 clothes_set:
  774.                   type: array
  775.                   description: Itens do pedido
  776.                   items:
  777.                     type: object
  778.                     properties:
  779.                       clothes:
  780.                         type: object
  781.                         description: Id e observações para a roupa
  782.                         properties:
  783.                           objectId:
  784.                             type: string
  785.                       whase_type:
  786.                         $ref: '#/definitions/basic_services'
  787.                       price:
  788.                         type: number
  789.                         title: Price
  790.                         format: float
  791.  
  792.  
  793.   /swagger:
  794.     x-swagger-pipe: swagger_raw
  795. # complex objects have schema definitions
  796.  
  797.  
  798. definitions:
  799.   basic_user:
  800.     type: object
  801.     properties:
  802.       username:
  803.         type: string
  804.       email:
  805.         type: string
  806.       password:
  807.         type: string
  808.         format: password
  809.     required:
  810.        - username
  811.         - email
  812.         - password
  813.  
  814.  
  815.   post_response_address:
  816.       properties:
  817.         message:
  818.            type: string
  819.  
  820.   response_user:
  821.       type: object
  822.       properties:
  823.         user:
  824.           type: object
  825.           description: return a user object
  826.       required:
  827.        - user
  828.  
  829.   status_pedido:
  830.       type: object
  831.       title: Estado do pedido
  832.       description: Relação de estados assumíveis para um pedido
  833.       enum: &STATUS
  834.         - Entregue
  835.         - Finalizado
  836.         - Solicitado
  837.         - Em andamento
  838.   basic_services:
  839.     type: object
  840.     title: Serviços básicos
  841.     description: Relação de serviços básicos
  842.     enum: &BASIC_SERVICES
  843.       - Completo
  844.       - Passadoria
  845.       - Recuperação
  846.   especial_service:
  847.     type: object
  848.     title: Serviço especial
  849.     description: Serviço especial oferecido pela lavanderia
  850.     properties:
  851.       name:
  852.         type: string
  853.         description: Nome do serviço especial
  854.       price:
  855.         type: number
  856.         format: float
  857.         description: Custo do serviço especial
  858.       description:
  859.         type: string
  860.         description: Descrição do serviço especial
  861.       icon:
  862.         type: string
  863.         description: URL para icone representativo do serviço especial
  864.   clothes:
  865.     type: object
  866.     title: Clothes
  867.     description: Peça de roupa
  868.     #uniqueItems: true
  869.     properties:
  870.       enabled:
  871.         type: boolean
  872.         description: Status da peça (false, caso desabilitado/excluida)
  873.       version:
  874.         type: number
  875.         title: Versão do documento
  876.         description: Contador que deve ser incrementado sempre que uma alteração no documento for realizada. Uma cópia do documento antigo deve ser gerado
  877.       pictures:
  878.         type: array
  879.         description: URL para as peças de roupas. Deve ser limitada a três fotos por peça
  880.         items:
  881.           type: string
  882.           description: URL para foto da peça
  883.       type:
  884.         type: string
  885.         description: Tipo da peça de roupa EX... Camisa, Calça, Meia
  886.       brand:
  887.         type: string
  888.         description: Marca da roupa
  889.       color:
  890.         type: string
  891.         description: Cor predominante da roupa
  892.       print:
  893.         type: string
  894.         description: Estampa da roupa
  895.       station:
  896.         type: string
  897.         description: Estação para uso da roupa
  898.       observations:
  899.         type: array
  900.         description: Observações individuais da peça de roupa
  901.         items:
  902.           type: string
  903.       whashes:
  904.         type: integer
  905.         description: Número de lavagens sofridas pela peça
  906.       register_date:
  907.         type: string
  908.         format: date
  909.         description: Data de cadastro da peça
  910.   orders:
  911.     type: object
  912.     title: Order
  913.     description: Pedido realizado pelo usuário
  914.     properties:
  915.       solicitation_time:
  916.         type: string
  917.         format: date-time
  918.         description: Data de realização do pedido
  919.       finish_time:
  920.         type: string
  921.         format: date-time
  922.         description: Data de finalização do pedido
  923.       removal_time:
  924.         type: string
  925.         format: date-time
  926.         description: Data de retirada/entrega do pedido
  927.       status:
  928.         $ref: '#/definitions/status_pedido'
  929.       cart_itens:
  930.         type: object
  931.         properties:
  932.           clothes_set:
  933.             type: array
  934.             description: Itens do pedido
  935.             items:
  936.               type: object
  937.               properties:
  938.                 clothes:
  939.                   $ref: '#/definitions/clothes'
  940.                 whase_type:
  941.                   $ref: '#/definitions/basic_services'
  942.                 price:
  943.                   type: number
  944.                   title: Price
  945.                   format: float
  946.           services:
  947.             type: array
  948.             items:
  949.               type: object
  950.               properties:
  951.                 service:
  952.                   $ref: '#/definitions/especial_service'
  953.                 price:
  954.                   type: number
  955.                   title: Price
  956.                   format: float
  957.   agent:
  958.     type: object
  959.     title: Agent
  960.     description: Dados do representante da loja
  961.     properties:
  962.       name:
  963.         type: string
  964.         description: Nome do representante da loja
  965.       email:
  966.         type: string
  967.         description: Email do representante da loja
  968.         pattern: '^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]{2,62}$'
  969.       cpf:
  970.         type: string
  971.         description: CPF do representante da loja
  972.       password:
  973.         type: string
  974.         format: password
  975.         description: Chave de acesso do usuário ao sistema
  976.   administrator:
  977.     type: object
  978.     title: Administrator
  979.     description: Usário administrador do sistema
  980.     properties:
  981.       email:
  982.         type: string
  983.         description: Email de contato do administrator do sistema
  984.       password:
  985.         type: string
  986.         format: password
  987.   washebles:
  988.     title: Laváveis
  989.     type: object
  990.     properties:
  991.       name:
  992.         type: string
  993.         description: Tipo de peça pré-autorizado pela loja
  994.       enabled:
  995.         type: boolean
  996.         description: Status de disponibilidade da peça
  997.       icon:
  998.         type: string
  999.         format: byte
  1000.         description: URL para icone default
  1001.       services:
  1002.         type: object
  1003.         description: Serviço básicos oferecidos pela loja. Limitados a três
  1004.         properties:
  1005.           complete:
  1006.             type: object
  1007.             description: Serviço básico 1
  1008.             properties:
  1009.               price:
  1010.                 type: number
  1011.                 format: float
  1012.               enabled:
  1013.                 type: boolean
  1014.                 description: Disponibilidade do serviço básico
  1015.           recovery:
  1016.             type: object
  1017.             description: Serviço básico 2
  1018.             properties:
  1019.               price:
  1020.                 type: number
  1021.                 format: float
  1022.               enabled:
  1023.                 type: boolean
  1024.                 description: Disponibilidade do serviço básico
  1025.           ironing:
  1026.             type: object
  1027.             description: Serviço básico 3
  1028.             properties:
  1029.               price:
  1030.                 type: number
  1031.                 format: float
  1032.               enabled:
  1033.                 type: boolean
  1034.                 description: Disponibilidade do serviço básico
  1035.   store:
  1036.     type: object
  1037.     title: Store
  1038.     description: Entidade que ofereçe os serviços e é selecionavel pelo usuário
  1039.     properties:
  1040.       tipo:
  1041.         type: object
  1042.         description: Tipo de loja EX:. Franqueado, Autonoma
  1043.         enum: &laundery_type
  1044.           - Franqueado
  1045.           - Autonoma
  1046.       name:
  1047.         type: string
  1048.         description: Nome fantasia da loja
  1049.       social_reason:
  1050.         type: string
  1051.         description: Razão social da loja
  1052.       cnpj:
  1053.         type: string
  1054.         description: CNPJ da loja
  1055.       ie:
  1056.         type: string
  1057.         description: Inscrição estadual
  1058.       adrress:
  1059.         type: string
  1060.         description: Endereço da loja
  1061.       agent:
  1062.         $ref: '#/definitions/agent'
  1063.       especial_services:
  1064.         type: array
  1065.         description: Relação de servicos especiais oferecidos
  1066.         items:
  1067.           $ref: '#/definitions/especial_service'
  1068.       delivery_services:
  1069.         type: object
  1070.         properties:
  1071.           delivery:
  1072.             type: boolean
  1073.             description: Disponibilidade do serviço de delivery
  1074.           checkin:
  1075.             type: boolean
  1076.             description: Disponibilidade do serviço de entrega e retirada na loja
  1077.       washebles:
  1078.         type: array
  1079.         description: Lista de ids para os laváveis da loja
  1080.         items:
  1081.             type: string
  1082.   franchise:
  1083.     type: object
  1084.     title: Franchise
  1085.     properties:
  1086.       name:
  1087.         type: string
  1088.         description: Nome fantasia da loja
  1089.       social_reason:
  1090.         type: string
  1091.         description: Razão social da loja
  1092.       cnpj:
  1093.         type: string
  1094.         description: CNPJ da loja
  1095.       ie:
  1096.         type: string
  1097.         description: Inscrição estadual
  1098.       adrress:
  1099.         type: string
  1100.         description: Endereço da loja
  1101.       agent:
  1102.         $ref: '#/definitions/agent'
  1103.       stores:
  1104.         type: array
  1105.         items:
  1106.           $ref: '#/definitions/store'
  1107.   address:
  1108.     type: object
  1109.     title: Address of client
  1110.     properties:
  1111.       postal_code:
  1112.         type: string
  1113.         description: Código postal (CEP) do endereço
  1114.       city:
  1115.         type: string
  1116.         description: Nome da Cidade
  1117.       neighborhood:
  1118.         type: string
  1119.         description: Nome do bairro
  1120.       place:
  1121.         type: string
  1122.         description: Logradouro do endereço
  1123.   client:
  1124.     type: object
  1125.     title: Client
  1126.     required:
  1127.      - username
  1128.       - email
  1129.       - password
  1130.     properties:
  1131.       username:
  1132.         type: string
  1133.         description: Nome completo do usuário do sistema
  1134.       email:
  1135.         type: string
  1136.         description: Email ativo do usuário
  1137.       password:
  1138.         type: string
  1139.         format: password
  1140.         description: Chave de acesso do usuário ao sistema
  1141.       contact:
  1142.         type: string
  1143.         description: Telefone do usuário
  1144.       status:
  1145.         type: boolean
  1146.         description: Status do usuário
  1147.       register_date:
  1148.         type: string
  1149.         format: date
  1150.         description: Data de registro do usuário
  1151.       closet:
  1152.         type: array
  1153.         description: Array de ObjectId para as roupas do usuário
  1154.         items:
  1155.           type: string
  1156.           format: hexadecimal
  1157.       orders:
  1158.         type: array
  1159.         description: Array de ObjectId para os pedidos do usuário
  1160.         items:
  1161.           type: string
  1162.           format: hexadecimal
  1163.       addresses:
  1164.         type: array
  1165.         description: Lista de endereços ativos do usuário
  1166.         items:
  1167.           $ref: '#/definitions/address'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement