operationId: createDriver
summary: Create driver
tags:
  -  drivers
parameters:
  - $ref: ../../components/header-parameters/tenant-subdomain.yml
requestBody:
  content:
    application/json:
      schema:
        allOf:
          - $ref: ../../components/schemas/entities/driver/properties.yml
          - properties:
              user:
                allOf:
                  - $ref: ../../components/schemas/entities/user/properties.yml
                  - $ref: ../../components/schemas/entities/user/required_properties.yml
              transportCompanyId:
                type: string
            required:
              -  user
              -  transportCompanyId

responses:
  201:
    description: Success
    content:
      application/json:
        schema:
          allOf:
            - $ref: ../../components/schemas/entities/driver/properties.yml
            - $ref: ../../components/schemas/entities/driver/relations.yml
  400:
    $ref: ../../components/responses/400-bad-request.yml
