/employee/{storeid}:
  get:
    tags:
    - employee
    description: Return all the employees belong to given store
    operationId: listEmployees
    security:
    - bearerAuth: []
    parameters:
    - $ref#storeid: './parameters/storeid.yaml'
    - name: status
      in: query
      description: Status
      schema:
        type: string
    responses:
      $ref#4xx: './responses/4xx.yaml'
      200:
        description: list of employee
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Employee'
  post:
    tags:
    - employee
    description: Update/Create employee
    operationId: saveEmployee
    security:
    - bearerAuth: []
    parameters:
    - $ref#storeid: './parameters/storeid.yaml'
    requestBody:
      required: true
      content:
        application/json: 
          schema: 
            $ref: '#/components/schemas/Employee'
    responses:
      $ref#4xx: './responses/4xx.yaml'
      $ref#upsert: './responses/20x-upsert.yaml'

/employee/{storeid}/{id}:
  get:
    tags:
    - employee
    description: Return the employee with given id
    operationId: loadEmployee
    security:
    - bearerAuth: []
    parameters:
    - $ref#storeid: './parameters/storeid.yaml'
    - $ref#employeeid: './parameters/objectid.yaml'
    responses:
      $ref#4xx: './responses/4xx.yaml'
      200:
        description: employee detail
        content:
          application/json:
            schema:
              type: object
              properties: 
                value:
                  $ref: '#/components/schemas/Employee'
  delete:
    tags:
    - employee
    description: Delete an employee with given id
    operationId: deleteEmployee
    security:
    - bearerAuth: []
    parameters:
    - $ref#storeid: './parameters/storeid.yaml'
    - $ref#employeeid: './parameters/objectid.yaml'
    responses:
      $ref#4xx: './responses/4xx.yaml'
      $ref#204: './responses/204.yaml'

/eaccount/{storeid}:
  get:
    tags:
    - employee
    description: Return the current employee detail
    operationId: getAccount
    security:
    - bearerAuth: []
    parameters:
    - $ref#storeid: './parameters/storeid.yaml'
    responses:
      $ref#4xx: './responses/4xx.yaml'
      200:
        description: employee detail
        content:
          application/json:
            schema:
              type: object
              properties: 
                value:
                  $ref: '#/components/schemas/Employee'
  post:
    tags:
    - employee
    description: Return the current employee detail
    operationId: updateAccount
    security:
    - bearerAuth: []
    parameters:
    - $ref#storeid: './parameters/storeid.yaml'
    requestBody:
      required: true
      content:
        application/json: 
          schema: 
            $ref: '#/components/schemas/Employee'
    responses:
      $ref#4xx: './responses/4xx.yaml' 
      $ref#200: './responses/200-update-account.yaml'
