get:
  operationId: getSites
  tags:
    - sites
  summary: Récupère la liste des sites
  responses:
    200:
      description: OK
      content:
        application/json:
          schema:
            type: array
            items:
              allOf:
                - $ref: '../schemas/Site.yaml'
                - type: object
                  properties:
                    platform:
                      $ref: '../schemas/Platform.yaml'
                    company:
                      $ref: '../schemas/Company.yaml'
                    wms:
                      $ref: '../schemas/Warehouse.yaml'
post:
  operationId: postSites
  tags:
    - sites
  summary: Créer un nouveau site
  requestBody:
    required: true
    content:
      application/json:
        schema:
          type: object
          properties:
            name:
              type: string
            url:
              type: string
            platform:
              type: object
              properties:
                id:
                  type: integer
            company:
              type: object
              properties:
                id:
                  type: string
            wms:
              type: object
              properties:
                id:
                  type: string
  responses:
    201:
      description: Created
      content:
        application/json:
          schema:
            allOf:
              - $ref: '../schemas/Site.yaml'
              - type: object
                properties:
                  platform:
                    $ref: '../schemas/Platform.yaml'
                  company:
                    $ref: '../schemas/Company.yaml'
                  wms:
                    $ref: '../schemas/Warehouse.yaml'
