paths:
  /housing/house:
    get:
      tags:
        - Housing
      summary: Get all housing
      parameters:
        - in: query
          name: city
          schema:
            type: string
          description: Filter by city
        - in: query
          name: price
          schema:
            type: number
          description: Filter by price per night
        - in: query
          name: district
          schema:
            type: string
          description: Filter by district
        - in: query
          name: isAvailable
          schema:
            type: boolean
          description: Filter by availability
      responses:
        200:
          description: A list of housing
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Housing'
        500:
          description: Server error

    post:
      tags:
        - Housing
      summary: Create a new housing
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Housing'
      responses:
        201:
          description: Housing created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Housing'
        400:
          description: Invalid input

  /housing/house/{id}:
    get:
      tags:
        - Housing
      summary: Get housing by ID
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        200:
          description: A housing object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Housing'
        404:
          description: Housing not found
        500:
          description: Server error

    put:
      tags:
        - Housing
      summary: Update housing
      security:
        - bearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Housing'
      responses:
        200:
          description: Housing updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Housing'
        400:
          description: Invalid input
        404:
          description: Housing not found

    delete:
      tags:
        - Housing
      summary: Delete housing
      security:
        - bearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        204:
          description: Housing deleted successfully
        404:
          description: Housing not found
        500:
          description: Server error

  /housing/hotel:
    get:
      tags:
        - Hotels
      summary: Get all hotels
      parameters:
        - in: query
          name: city
          schema:
            type: string
          description: Filter by city
        - in: query
          name: district
          schema:
            type: string
          description: Filter by district
        - in: query
          name: isAvailable
          schema:
            type: boolean
          description: Filter by availability
      responses:
        200:
          description: A list of hotels
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Hotel'
        500:
          description: Server error

    post:
      tags:
        - Hotels
      summary: Create a new hotel
      security:
        - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Hotel'
      responses:
        201:
          description: Hotel created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Hotel'
        400:
          description: Invalid input

  /housing/hotel/{id}:
    put:
      tags:
        - Hotels
      summary: Update hotel
      security:
        - bearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Hotel'
      responses:
        200:
          description: Hotel updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Hotel'
        400:
          description: Invalid input
        404:
          description: Hotel not found

    delete:
      tags:
        - Hotels
      summary: Delete hotel
      security:
        - bearerAuth: []
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
      responses:
        204:
          description: Hotel deleted successfully
        404:
          description: Hotel not found
        500:
          description: Server error

  /housing/all:
    get:
      tags:
        - Housing
        - Hotels
      summary: Get all housing and hotels
      responses:
        200:
          description: A list of housing and hotels
          content:
            application/json:
              schema:
                type: object
                properties:
                  houses:
                    type: array
                    items:
                      $ref: '#/components/schemas/Housing'
                  hotels:
                    type: array
                    items:
                      $ref: '#/components/schemas/Hotel'
        500:
          description: Server error