get:
  operationId: getWarehouseById
  tags:
    - warehouses
  summary: Get a warehouse
  parameters:
    - $ref: '#/components/parameters/warehouseId'
  responses:
    200:
      description: OK
      content:
        application/json:
          schema:
            $ref: '../schemas/Warehouse.yaml'
put:
  operationId: putWarehouseById
  tags:
    - warehouses
  summary: Updates a warehouse
  parameters:
    - $ref: '#/components/parameters/warehouseId'
  requestBody:
    required: true
    content:
      application/json:
        schema:
          type: object
          properties:
            code:
              type: string
            name:
              type: string
  responses:
    200:
      description: OK
      content:
        application/json:
          schema:
            $ref: '../schemas/Warehouse.yaml'
delete:
  operationId: deleteWarehouseById
  tags:
    - warehouses
  summary: Deletes a warehouse
  parameters:
    - $ref: '#/components/parameters/warehouseId'
  responses:
    204:
      description: Deleted

components:
  parameters:
    warehouseId:
      in: path
      name: warehouseId
      required: true
      description: warehouse UUID
      schema:
        type: string
