{
  "openapi": "3.0.4",
  "info": {
    "title": "Husvo API",
    "description": "Husvo för appar. Logga in med en mejlad kod, använd sedan enhetstoken som bearer.",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://husvo.app"
    }
  ],
  "paths": {
    "/api/v1/houses/{houseId}/activity": {
      "get": {
        "tags": [
          "activity"
        ],
        "summary": "Vad som hänt i huset, nyast först, med antal olästa",
        "operationId": "listActivity",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/activity/read": {
      "post": {
        "tags": [
          "activity"
        ],
        "summary": "Markera allt som läst för mig",
        "operationId": "markActivityRead",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/appliances": {
      "get": {
        "tags": [
          "appliances"
        ],
        "summary": "Husets prylar",
        "operationId": "listAppliances",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplianceListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "appliances"
        ],
        "summary": "Lägg till en pryl",
        "operationId": "addAppliance",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/ApplianceBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplianceDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/appliances/{applianceId}": {
      "get": {
        "tags": [
          "appliances"
        ],
        "summary": "En pryl med manualer och underhåll",
        "operationId": "getAppliance",
        "parameters": [
          {
            "name": "applianceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplianceDetailDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "appliances"
        ],
        "summary": "Ändra en pryl. Fält som utelämnas lämnas orörda; en tom sträng tömmer textfält",
        "operationId": "updateAppliance",
        "parameters": [
          {
            "name": "applianceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/ApplianceBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplianceDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "appliances"
        ],
        "summary": "Tar bort prylen, dess bilder och manualer. Uppgifterna i underhållet blir kvar. Fråga i appen först",
        "operationId": "deleteAppliance",
        "parameters": [
          {
            "name": "applianceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/ask": {
      "post": {
        "tags": [
          "ask"
        ],
        "summary": "Ställ en fråga om huset. Svaret bygger på manualer, journal och prylar",
        "operationId": "askHouse",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/AskBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AskResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/ask/quota": {
      "get": {
        "tags": [
          "ask"
        ],
        "summary": "Hur många frågor huset har kvar den här månaden, och om AI är påslaget",
        "operationId": "getAskQuota",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AskQuotaDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/token": {
      "delete": {
        "tags": [
          "auth"
        ],
        "summary": "Logga ut den här enheten",
        "operationId": "logOut",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Byt koden mot en enhetstoken",
        "operationId": "redeemCode",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/RedeemBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/houses": {
      "get": {
        "tags": [
          "houses"
        ],
        "summary": "Husen jag är med i, med min roll i vart och ett",
        "operationId": "listHouses",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HouseListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/invites": {
      "get": {
        "tags": [
          "me"
        ],
        "summary": "Inbjudningar till mitt konto som väntar på svar",
        "operationId": "listMyInvites",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MyInviteListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/invites/{inviteId}/accept": {
      "post": {
        "tags": [
          "me"
        ],
        "summary": "Tacka ja till en inbjudan och bli medlem i huset",
        "operationId": "acceptInvite",
        "parameters": [
          {
            "name": "inviteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeHouseDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/invites/{inviteId}/decline": {
      "post": {
        "tags": [
          "me"
        ],
        "summary": "Tacka nej till en inbjudan",
        "operationId": "declineInvite",
        "parameters": [
          {
            "name": "inviteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me": {
      "get": {
        "tags": [
          "me"
        ],
        "summary": "Vem är jag, och vilka hus är jag med i",
        "operationId": "getMe",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "me"
        ],
        "summary": "Byt visningsnamn",
        "operationId": "updateMe",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/UpdateMeBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "me"
        ],
        "summary": "Radera mitt konto och min persondata",
        "description": "Kräver en färsk kod till kontots adress i rubriken X-Confirm-Code (be om den med POST /auth/code). 403 confirmation_required eller invalid_confirmation utan en giltig kod.",
        "operationId": "deleteMe",
        "parameters": [
          {
            "name": "X-Confirm-Code",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/devices/current": {
      "put": {
        "tags": [
          "me"
        ],
        "summary": "Spara push-token och appversion för den här enheten",
        "operationId": "registerCurrentDevice",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/PushRegistrationBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/devices": {
      "get": {
        "tags": [
          "me"
        ],
        "summary": "Mina inloggade enheter",
        "operationId": "listDevices",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeviceListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/devices/{deviceId}": {
      "delete": {
        "tags": [
          "me"
        ],
        "summary": "Återkalla en enhet. Den egna enheten fungerar som utloggning",
        "operationId": "revokeDevice",
        "parameters": [
          {
            "name": "deviceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/devices/revoke-all": {
      "post": {
        "tags": [
          "me"
        ],
        "summary": "Logga ut överallt, den här enheten också",
        "operationId": "revokeAllDevices",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/photos/{photoId}/content": {
      "get": {
        "tags": [
          "photos"
        ],
        "summary": "Själva bilden",
        "operationId": "getPhotoContent",
        "parameters": [
          {
            "name": "photoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified"
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/photos/{photoId}": {
      "delete": {
        "tags": [
          "photos"
        ],
        "summary": "Radera en bild",
        "operationId": "deletePhoto",
        "parameters": [
          {
            "name": "photoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/sessions": {
      "get": {
        "tags": [
          "me"
        ],
        "summary": "Mina inloggningar: webbläsare och appen",
        "operationId": "listSessions",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionListResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/sessions/{sessionId}": {
      "delete": {
        "tags": [
          "me"
        ],
        "summary": "Logga ut en inloggning. Den egna appen fungerar som utloggning",
        "operationId": "revokeSession",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/me/sessions/revoke-others": {
      "post": {
        "tags": [
          "me"
        ],
        "summary": "Logga ut överallt utom här",
        "operationId": "revokeOtherSessions",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/buyer-links": {
      "get": {
        "tags": [
          "buyer-links"
        ],
        "summary": "Aktiva köparlänkar. Nyckeln visas aldrig här",
        "operationId": "listBuyerLinks",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuyerLinkListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "buyer-links"
        ],
        "summary": "Skapa en köparlänk till journalen. Adressen visas bara i det här svaret",
        "operationId": "createBuyerLink",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/BuyerLinkBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BuyerLinkCreatedDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/buyer-links/{buyerLinkId}": {
      "delete": {
        "tags": [
          "buyer-links"
        ],
        "summary": "Återkalla en köparlänk",
        "operationId": "revokeBuyerLink",
        "parameters": [
          {
            "name": "buyerLinkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/warranties": {
      "get": {
        "tags": [
          "warranties"
        ],
        "summary": "Garantier som går ut inom 60 dagar, närmast först",
        "operationId": "listWarranties",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WarrantyListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/calendar": {
      "get": {
        "tags": [
          "calendar"
        ],
        "summary": "Finns det en kalenderadress, och sedan när",
        "operationId": "getCalendarStatus",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarStatusDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "calendar"
        ],
        "summary": "Skapa ny kalenderadress. Visas bara här, och slår ut den gamla",
        "operationId": "createCalendarKey",
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarKeyDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "calendar"
        ],
        "summary": "Stäng av kalenderadressen",
        "operationId": "revokeCalendarKey",
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/calendar/events": {
      "get": {
        "tags": [
          "calendar"
        ],
        "summary": "Allt i huset med ett datum mellan from och to (ÅÅÅÅ-MM-DD, högst 400 dagar): uppgifter, garantier, avtal, papper, idéer och det som gjorts. Utan datum: innevarande månad",
        "operationId": "listCalendarEvents",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalendarEventsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/contracts": {
      "get": {
        "tags": [
          "contracts"
        ],
        "summary": "Husets avtal med sista uppsägningsdag, läge och årskostnad. De som snart ska sägas upp kommer först",
        "operationId": "listContracts",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "contracts"
        ],
        "summary": "Lägg till ett avtal. Utan slutdatum löper det tills vidare",
        "operationId": "addContract",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/AddContractBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/contracts/{contractId}": {
      "get": {
        "tags": [
          "contracts"
        ],
        "summary": "Ett avtal med sista uppsägningsdag, läge och årskostnad",
        "operationId": "getContract",
        "parameters": [
          {
            "name": "contractId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "contracts"
        ],
        "summary": "Ändra ett avtal. Fält som utelämnas lämnas orörda; clear-fälten tar bort ett värde",
        "operationId": "updateContract",
        "parameters": [
          {
            "name": "contractId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/PatchContractBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContractDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "contracts"
        ],
        "summary": "Tar bort avtalet. Det går inte att ångra, så fråga i appen först",
        "operationId": "deleteContract",
        "parameters": [
          {
            "name": "contractId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/craftsmen": {
      "get": {
        "tags": [
          "craftsmen"
        ],
        "summary": "Husets hantverkare, sorterade på namn, med hur många poster som pekar på var och en",
        "operationId": "listCraftsmen",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CraftsmanListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "craftsmen"
        ],
        "summary": "Lägg till en hantverkare. Bara name krävs",
        "operationId": "addCraftsman",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/CraftsmanBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CraftsmanDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/craftsmen/{craftsmanId}": {
      "get": {
        "tags": [
          "craftsmen"
        ],
        "summary": "En hantverkare",
        "operationId": "getCraftsman",
        "parameters": [
          {
            "name": "craftsmanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CraftsmanDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "craftsmen"
        ],
        "summary": "Ändra en hantverkare. Fält som utelämnas lämnas orörda; en tom sträng tömmer ett textfält",
        "operationId": "updateCraftsman",
        "parameters": [
          {
            "name": "craftsmanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/CraftsmanBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CraftsmanDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "craftsmen"
        ],
        "summary": "Tar bort hantverkaren. Journalposterna blir kvar men tappar kopplingen. Fråga i appen först",
        "operationId": "deleteCraftsman",
        "parameters": [
          {
            "name": "craftsmanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/export.zip": {
      "get": {
        "tags": [
          "export"
        ],
        "summary": "Allt som finns i huset som en zip: uppgifter, bilder, manualer, protokoll och journal. Bara ägaren",
        "operationId": "exportHouse",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/journal.pdf": {
      "get": {
        "tags": [
          "export"
        ],
        "summary": "Journalen som pdf, att ge till mäklaren eller nästa ägare. Alla medlemmar",
        "operationId": "exportJournal",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/journal.csv": {
      "get": {
        "tags": [
          "export"
        ],
        "summary": "Journalen som csv för Excel eller Numbers, samma fil som webben ger. Alla medlemmar",
        "operationId": "exportJournalCsv",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}": {
      "get": {
        "tags": [
          "houses"
        ],
        "summary": "Ett hus: profil, budget och påminnelsetid",
        "operationId": "getHouse",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HouseDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "houses"
        ],
        "summary": "Ändra husets namn, hur många dagar före påminnelsen går och på vilket sätt, och vad huset har",
        "description": "I features sätter has saker till ja, hasNot till nej och unknown tillbaka till vet ej, med samma namn som getHouse ger. Det som inte skickas lämnas orört. Namnen: sauna, woodFiredSauna, jetty, dryToilet, generator, privateRoad, solarPanels, homeBattery, evCharger, alarm, gasGrill, airToAirHeatPump, underfloorHeating, dehumidifier, leakDetector, sumpPit, waterTreatment, bathtub, skylights, flatRoof, snowGuards, heatingCable, glazedEnclosure, multipleFloors, robotMower, robotVacuum, snowBlower, fence, playEquipment, greenhouse, basementStairs, smartLock, woodFloors, emptyInWinter. heating: districtHeating, groundSource, airToWater, directElectric, pellets, electricBoiler, oilBoiler eller unknown. tenure: ownership, cooperative, rental eller unknown.",
        "operationId": "updateHouse",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/HousePatchBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HouseDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/today": {
      "get": {
        "tags": [
          "houses"
        ],
        "summary": "Startsidan: försenat, snart, räknare, nästa punkter och husets humör",
        "operationId": "getToday",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TodayResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/idea-budget": {
      "get": {
        "tags": [
          "ideas"
        ],
        "summary": "Idéernas budget: planerade idéer per år mot vad huset lagt de senaste åren, och klara idéer mot sin budget med summan av avvikelsen",
        "operationId": "getIdeaBudget",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeaBudgetResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/ideas": {
      "get": {
        "tags": [
          "ideas"
        ],
        "summary": "Idéerna i huset, nyast först. Filtrera på status, rum, år och prio",
        "operationId": "listIdeas",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roomId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "horizonYear",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "prio",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeaListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ideas"
        ],
        "summary": "Lägg in en idé",
        "operationId": "createIdea",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/IdeaInput"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeaDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/ideas/archived": {
      "get": {
        "tags": [
          "ideas"
        ],
        "summary": "Arkivet: borttagna idéer som ligger kvar i trettio dagar",
        "operationId": "listArchivedIdeas",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeaArchiveResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/ideas/{ideaId}": {
      "get": {
        "tags": [
          "ideas"
        ],
        "summary": "En idé. Svaret bär ETag: skicka den som If-Match när du ändrar",
        "operationId": "getIdea",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeaDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "ideas"
        ],
        "summary": "Ändra delar av en idé. If-Match krävs: 428 utan, 412 om någon hann före (med aktuell idé i current)",
        "operationId": "updateIdea",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/IdeaPatchInput"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeaDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "410": {
            "description": "Gone",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "428": {
            "description": "Precondition Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ideas"
        ],
        "summary": "Ta bort en idé. Den arkiveras i trettio dagar och kan återställas",
        "operationId": "archiveIdea",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/ideas/{ideaId}/status": {
      "put": {
        "tags": [
          "ideas"
        ],
        "summary": "Byt status. Done skriver en loggpost i journalen. If-Match är valfri här",
        "operationId": "setIdeaStatus",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/IdeaStatusBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeaDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "410": {
            "description": "Gone",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "412": {
            "description": "Precondition Failed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/ideas/{ideaId}/cover": {
      "put": {
        "tags": [
          "ideas"
        ],
        "summary": "Välj vilken av idéns bilder som är omslag. Bilden laddas upp med uploadPhoto och ideaId",
        "operationId": "setIdeaCover",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/IdeaCoverBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeaDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "410": {
            "description": "Gone",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/ideas/{ideaId}/assignee": {
      "put": {
        "tags": [
          "ideas"
        ],
        "summary": "Välj vem i hushållet som tar idén, eller null för ingen",
        "operationId": "setIdeaAssignee",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/AssigneeBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeaDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "410": {
            "description": "Gone",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/ideas/{ideaId}/like": {
      "put": {
        "tags": [
          "ideas"
        ],
        "summary": "Gilla. Idempotent: att gilla två gånger ger samma svar",
        "operationId": "likeIdea",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LikeDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "410": {
            "description": "Gone",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "ideas"
        ],
        "summary": "Sluta gilla. Idempotent",
        "operationId": "unlikeIdea",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LikeDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "410": {
            "description": "Gone",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/ideas/{ideaId}/comments": {
      "get": {
        "tags": [
          "ideas"
        ],
        "summary": "Kommentarerna på en idé, äldst först",
        "operationId": "listIdeaComments",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "ideas"
        ],
        "summary": "Kommentera en idé",
        "operationId": "addIdeaComment",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/CommentBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CommentDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "410": {
            "description": "Gone",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/ideas/{ideaId}/restore": {
      "post": {
        "tags": [
          "ideas"
        ],
        "summary": "Ta tillbaka en arkiverad idé",
        "operationId": "restoreIdea",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/IdeaDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/inspections": {
      "get": {
        "tags": [
          "inspections"
        ],
        "summary": "Husets besiktningsprotokoll, nyast först",
        "operationId": "listInspections",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InspectionListResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/inspections/{reportId}/content": {
      "get": {
        "tags": [
          "inspections"
        ],
        "summary": "Protokollet som pdf. Stöder Range",
        "operationId": "getInspectionContent",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/invites": {
      "get": {
        "tags": [
          "members"
        ],
        "summary": "Inbjudningar som väntar på svar. Bara ägaren",
        "operationId": "listInvites",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HouseInviteListResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/invites/{inviteId}": {
      "delete": {
        "tags": [
          "members"
        ],
        "summary": "Dra tillbaka en väntande inbjudan. Bara ägaren",
        "operationId": "revokeInvite",
        "parameters": [
          {
            "name": "inviteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/log": {
      "get": {
        "tags": [
          "log"
        ],
        "summary": "Journalen, senast först. Filtrera med kind och year, bläddra med cursor",
        "operationId": "listLog",
        "parameters": [
          {
            "name": "kind",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "log"
        ],
        "summary": "Skriv en loggpost",
        "operationId": "addLogEntry",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/AddLogBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogEntryDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/log/{logId}": {
      "patch": {
        "tags": [
          "log"
        ],
        "summary": "Ändra kostnad, förbättringsmarkering, byggdel eller hantverkare",
        "operationId": "updateLogEntry",
        "parameters": [
          {
            "name": "logId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/PatchLogBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogEntryDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/improvements": {
      "get": {
        "tags": [
          "log"
        ],
        "summary": "Värdehöjande förbättringar: summa, per år och vilka kvitton som saknas",
        "operationId": "getImprovements",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImprovementsResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/maintenance": {
      "get": {
        "tags": [
          "maintenance"
        ],
        "summary": "Underhållet med status, nästa datum och brådskeord",
        "operationId": "listMaintenance",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaintListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "maintenance"
        ],
        "summary": "Lägg till en egen uppgift: en gång på ett datum, eller återkommande med intervall i månader",
        "operationId": "createMaintenanceItem",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/CreateMaintBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaintItemDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/maintenance/{maintId}": {
      "get": {
        "tags": [
          "maintenance"
        ],
        "summary": "En underhållspost",
        "operationId": "getMaintenanceItem",
        "parameters": [
          {
            "name": "maintId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaintItemDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "maintenance"
        ],
        "summary": "Flytta nästa datum, ändra intervall, och på egna uppgifter namn, anteckning, rum och pryl",
        "operationId": "updateMaintenanceItem",
        "parameters": [
          {
            "name": "maintId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/UpdateMaintBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaintItemDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "maintenance"
        ],
        "summary": "Ta bort en egen uppgift. Katalogens stängs av i husprofilen. Journalen rörs inte",
        "operationId": "deleteMaintenanceItem",
        "parameters": [
          {
            "name": "maintId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/maintenance/{maintId}/done": {
      "post": {
        "tags": [
          "maintenance"
        ],
        "summary": "Markera som gjort, idag eller ett angivet datum, med valfri kostnad. Går att skicka om",
        "operationId": "markMaintenanceDone",
        "parameters": [
          {
            "name": "maintId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkDoneBody"
              }
            },
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/MarkDoneBody"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkDoneResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/maintenance/{maintId}/last-done": {
      "put": {
        "tags": [
          "maintenance"
        ],
        "summary": "Ange när det senast gjordes, i efterhand. Skriver ingen loggpost",
        "operationId": "setMaintenanceLastDone",
        "parameters": [
          {
            "name": "maintId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/LastDoneBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaintItemDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/maintenance/{maintId}/assignee": {
      "put": {
        "tags": [
          "maintenance"
        ],
        "summary": "Välj vem i hushållet som tar uppgiften, eller null för ingen. Den som tar den får påminnelsen",
        "operationId": "setMaintenanceAssignee",
        "parameters": [
          {
            "name": "maintId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/AssigneeBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaintItemDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/suggestions": {
      "get": {
        "tags": [
          "maintenance"
        ],
        "summary": "Punkter ur biblioteket som passar huset men saknas",
        "operationId": "listMaintenanceSuggestions",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuggestionListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/suggestions/{libraryId}/accept": {
      "post": {
        "tags": [
          "maintenance"
        ],
        "summary": "Lägg till ett underhållsförslag i huset",
        "operationId": "acceptMaintenanceSuggestion",
        "parameters": [
          {
            "name": "libraryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaintItemDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/suggestions/{libraryId}/dismiss": {
      "post": {
        "tags": [
          "maintenance"
        ],
        "summary": "Avvisa ett underhållsförslag",
        "operationId": "dismissMaintenanceSuggestion",
        "parameters": [
          {
            "name": "libraryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/manuals": {
      "get": {
        "tags": [
          "manuals"
        ],
        "summary": "Husets manualer, valfritt för en pryl (?applianceId=)",
        "operationId": "listManuals",
        "parameters": [
          {
            "name": "applianceId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManualListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/manuals/search": {
      "get": {
        "tags": [
          "manuals"
        ],
        "summary": "Fritextsökning i manualerna. Bäst träff först, med utdrag där träffen är markerad",
        "operationId": "searchManuals",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "applianceId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ManualSearchResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/manuals/{manualId}/content": {
      "get": {
        "tags": [
          "manuals"
        ],
        "summary": "Manualen som pdf. Stöder Range",
        "operationId": "getManualContent",
        "parameters": [
          {
            "name": "manualId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/shopping-list": {
      "get": {
        "tags": [
          "materials"
        ],
        "summary": "Husets inköpslista: det som inte är köpt, per idé. Klara och borttagna idéer är inte med",
        "operationId": "getShoppingList",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShoppingListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/ideas/{ideaId}/materials": {
      "get": {
        "tags": [
          "materials"
        ],
        "summary": "Materialet till en idé, med summan av raderna som har pris",
        "operationId": "listIdeaMaterials",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaterialListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "materials"
        ],
        "summary": "Lägg till en rad att köpa på en idé. Mängden är fri text, priset hela kronor för raden",
        "operationId": "addIdeaMaterial",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/AddMaterialBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaterialDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/ideas/{ideaId}/materials/{materialId}": {
      "patch": {
        "tags": [
          "materials"
        ],
        "summary": "Ändra text, mängd eller pris på en rad. Utelämnade fält lämnas orörda",
        "operationId": "updateIdeaMaterial",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "materialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/PatchMaterialBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaterialDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "materials"
        ],
        "summary": "Ta bort en rad. Den går inte att få tillbaka",
        "operationId": "deleteIdeaMaterial",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "materialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/ideas/{ideaId}/materials/{materialId}/bought": {
      "put": {
        "tags": [
          "materials"
        ],
        "summary": "Bocka av en rad som köpt. Idempotent",
        "operationId": "markMaterialBought",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "materialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaterialDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "materials"
        ],
        "summary": "Ångra att en rad är köpt, så att den kommer tillbaka på inköpslistan. Idempotent",
        "operationId": "unmarkMaterialBought",
        "parameters": [
          {
            "name": "ideaId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "materialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MaterialDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/members": {
      "get": {
        "tags": [
          "members"
        ],
        "summary": "Vilka som bor i huset. E-post visas bara för ägaren",
        "operationId": "listMembers",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "members"
        ],
        "summary": "Bjud in med namn eller e-post som redigerare eller läsare. Bara ägaren",
        "description": "Ett namn blir en plats i hushållet utan konto (201). En e-postadress blir en väntande inbjudan som mottagaren själv måste tacka ja till (202), och ger ingen åtkomst före det. Svaret är detsamma oavsett om adressen redan har ett konto.",
        "operationId": "inviteMember",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/InviteMemberBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberDto"
                }
              }
            }
          },
          "202": {
            "description": "Accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitePendingDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/members/{memberId}": {
      "patch": {
        "tags": [
          "members"
        ],
        "summary": "Byt en medlems roll mellan redigerare och läsare. Ägaren går inte att ändra",
        "operationId": "changeMemberRole",
        "parameters": [
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/MemberRoleBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "members"
        ],
        "summary": "Ta bort en medlem. Ägaren går inte att ta bort",
        "operationId": "removeMember",
        "parameters": [
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/meters": {
      "get": {
        "tags": [
          "meters"
        ],
        "summary": "Husets mätare med senaste avläsning och förbrukningen sedan den förra",
        "operationId": "listMeters",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeterListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/meters/anomalies": {
      "get": {
        "tags": [
          "meters"
        ],
        "summary": "Perioder med ovanligt hög förbrukning per dag, för alla mätare, senast först",
        "operationId": "listMeterAnomalies",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeterAnomalyListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/meters/{meterId}/readings": {
      "get": {
        "tags": [
          "meters"
        ],
        "summary": "Alla avläsningar för en mätare, nyast först, med förbrukningen sedan förra",
        "operationId": "listMeterReadings",
        "parameters": [
          {
            "name": "meterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeterReadingListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/meters/{meterId}/consumption": {
      "get": {
        "tags": [
          "meters"
        ],
        "summary": "Förbrukning per kalendermånad fram till senaste avläsningen. months är 1–60, tolv om det utelämnas",
        "operationId": "getMeterConsumption",
        "parameters": [
          {
            "name": "meterId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "months",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeterConsumptionResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/meter-readings": {
      "post": {
        "tags": [
          "meters"
        ],
        "summary": "Lägg in en avläsning. Utan meterId skapas mätaren av slaget kind vid första avläsningen",
        "operationId": "addMeterReading",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/AddMeterReadingBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeterReadingAddedResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/meter-readings/{readingId}": {
      "delete": {
        "tags": [
          "meters"
        ],
        "summary": "Ta bort en avläsning. Var den mätarens sista tas mätaren bort med den",
        "operationId": "deleteMeterReading",
        "parameters": [
          {
            "name": "readingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeterReadingDeletedResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/outlook": {
      "get": {
        "tags": [
          "outlook"
        ],
        "summary": "Vad huset kostar de närmaste tio åren: uppskattat spann per år av uppgifter som förfaller och byggdelar och prylar som når normal livslängd, mot husets budget",
        "operationId": "getOutlook",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OutlookResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/papers": {
      "get": {
        "tags": [
          "papers"
        ],
        "summary": "Husets papper per sort i webbens ordning, med giltighet för dem som har ett slutdatum",
        "operationId": "listPapers",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaperListResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "papers"
        ],
        "summary": "Ladda upp ett papper (multipart: file, kind, title, date, validUntil). Pdf eller bild, högst 25 MB",
        "operationId": "uploadPaper",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/PaperUploadForm"
              }
            },
            "*/*": {
              "schema": {
                "$ref": "#/components/schemas/PaperUploadForm"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaperDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/papers/{paperId}/content": {
      "get": {
        "tags": [
          "papers"
        ],
        "summary": "Papperets fil, pdf eller bild. Stöder Range",
        "operationId": "getPaperContent",
        "parameters": [
          {
            "name": "paperId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/jpeg": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "image/webp": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "304": {
            "description": "Not Modified"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/papers/{paperId}": {
      "patch": {
        "tags": [
          "papers"
        ],
        "summary": "Ändra sort, titel, datum eller slutdatum. Filen ligger kvar",
        "operationId": "updatePaper",
        "parameters": [
          {
            "name": "paperId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/PaperPatchBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaperDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "papers"
        ],
        "summary": "Ta bort papperet, både raden och filen",
        "operationId": "deletePaper",
        "parameters": [
          {
            "name": "paperId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/photos": {
      "post": {
        "tags": [
          "photos"
        ],
        "summary": "Ladda upp en jpeg (rå body, högst 8 MB) till ett rum, en loggpost, en pryl eller en idé (högst 20 bilder per idé)",
        "operationId": "uploadPhoto",
        "parameters": [
          {
            "name": "roomId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "logEntryId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "applianceId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "ideaId",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "image/jpeg": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            },
            "*/*": {
              "schema": {
                "type": "string",
                "format": "binary"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PhotoDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "413": {
            "description": "Payload Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/plan": {
      "get": {
        "tags": [
          "plan"
        ],
        "summary": "Husets plan, gränserna som gäller och hur mycket som är använt",
        "operationId": "getPlan",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanDto"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/plan/trial": {
      "post": {
        "tags": [
          "plan"
        ],
        "summary": "Starta husets provperiod på Plus, 30 dagar. En gång per hus; 409 om den redan använts",
        "operationId": "startPlanTrial",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/rooms": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "Rummen, ordnade som på webben: våning först",
        "operationId": "listRooms",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "rooms"
        ],
        "summary": "Lägg till ett rum",
        "operationId": "addRoom",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/RoomBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/rooms/{roomId}": {
      "patch": {
        "tags": [
          "rooms"
        ],
        "summary": "Byt namn eller våning på ett rum. Det som utelämnas behålls",
        "operationId": "updateRoom",
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/RoomBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/room-facts": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "Alla rum med sina fakta (färger, golv, tapeter, mått), i rumslistans ordning",
        "operationId": "listHouseRoomFacts",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HouseRoomFactListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/rooms/{roomId}/facts": {
      "get": {
        "tags": [
          "rooms"
        ],
        "summary": "Ett rums fakta, ordnade efter typ och senast gjort först",
        "operationId": "listRoomFacts",
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomFactListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "rooms"
        ],
        "summary": "Lägg till en faktarad i ett rum, till exempel väggfärgen",
        "operationId": "addRoomFact",
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/RoomFactBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomFactDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/rooms/{roomId}/facts/{factId}": {
      "patch": {
        "tags": [
          "rooms"
        ],
        "summary": "Ändra en faktarad. Det som utelämnas behålls",
        "operationId": "updateRoomFact",
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "factId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/RoomFactPatchBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomFactDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "rooms"
        ],
        "summary": "Ta bort en faktarad",
        "operationId": "deleteRoomFact",
        "parameters": [
          {
            "name": "roomId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "factId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/search": {
      "get": {
        "tags": [
          "search"
        ],
        "summary": "Sök i husets idéer, uppgifter, prylar, journalposter, papper, avtal, hantverkare, rum och rummens fakta. Varje ord i q ska finnas på raden; grupperat per sort, bästa träffen först",
        "operationId": "searchHouse",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "perKind",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/share-links": {
      "get": {
        "tags": [
          "share-links"
        ],
        "summary": "Aktiva länkar till hantverkare. Nyckeln visas aldrig här",
        "operationId": "listShareLinks",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareLinkListResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "share-links"
        ],
        "summary": "Skapa en länk till valda idéer. Adressen visas bara i det här svaret",
        "operationId": "createShareLink",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/ShareLinkBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShareLinkCreatedDto"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/share-links/{linkId}": {
      "delete": {
        "tags": [
          "share-links"
        ],
        "summary": "Återkalla en länk",
        "operationId": "revokeShareLink",
        "parameters": [
          {
            "name": "linkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/year/{year}": {
      "get": {
        "tags": [
          "year"
        ],
        "summary": "Husets år: avklarade uppgifter, förbättringsutgifter, mest aktiva rum och prylar, garantier och Husses replik",
        "operationId": "getYearInReview",
        "parameters": [
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/YearReviewResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/houses/{houseId}/year/{year}/pdf": {
      "get": {
        "tags": [
          "year"
        ],
        "summary": "Husets år som pdf",
        "operationId": "exportYearInReview",
        "parameters": [
          {
            "name": "year",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/code": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Be om en inloggningskod till en mejladress",
        "operationId": "requestCode",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "enum": [
                      null
                    ],
                    "nullable": true
                  },
                  {
                    "$ref": "#/components/schemas/RequestCodeBody"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted"
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiProblem"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/health": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "Svarar bara om appen når sin databas",
        "operationId": "getHealth",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable"
          }
        },
        "security": [ ]
      }
    },
    "/api/v1/meta": {
      "get": {
        "tags": [
          "meta"
        ],
        "summary": "Lägsta klientversion och vilka funktioner servern har",
        "operationId": "getMeta",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MetaResponse"
                }
              }
            }
          }
        },
        "security": [ ]
      }
    }
  },
  "components": {
    "schemas": {
      "ActivityDto": {
        "required": [
          "id",
          "actorName",
          "what",
          "where",
          "createdAt",
          "unread"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "actorName": {
            "type": "string"
          },
          "what": {
            "type": "string"
          },
          "where": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time"
          },
          "unread": {
            "type": "boolean"
          }
        }
      },
      "ActivityListResponse": {
        "required": [
          "items",
          "unreadCount",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ActivityDto"
            }
          },
          "unreadCount": {
            "type": "integer",
            "format": "int32"
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "AddContractBody": {
        "required": [
          "kind",
          "provider",
          "costKr",
          "costPeriod",
          "startedAt",
          "endsAt",
          "bindingMonths",
          "noticeMonths",
          "notes",
          "applianceId"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "nullable": true
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "costKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "costPeriod": {
            "type": "string",
            "nullable": true
          },
          "startedAt": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "endsAt": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "bindingMonths": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "noticeMonths": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "applianceId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "AddLogBody": {
        "required": [
          "date",
          "what",
          "component",
          "kind",
          "costKr",
          "isImprovement",
          "contractor",
          "phone",
          "warrantyUntil",
          "buildingPart"
        ],
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "what": {
            "type": "string",
            "nullable": true
          },
          "component": {
            "type": "string",
            "nullable": true
          },
          "kind": {
            "type": "string",
            "nullable": true
          },
          "costKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isImprovement": {
            "type": "boolean"
          },
          "contractor": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "warrantyUntil": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "buildingPart": {
            "type": "string",
            "nullable": true
          },
          "craftsmanId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "AddMaterialBody": {
        "required": [
          "text",
          "amount",
          "priceKr"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "nullable": true
          },
          "amount": {
            "type": "string",
            "nullable": true
          },
          "priceKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "AddMeterReadingBody": {
        "required": [
          "meterId",
          "kind",
          "name",
          "unit",
          "date",
          "value"
        ],
        "type": "object",
        "properties": {
          "meterId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "kind": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "unit": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "value": {
            "type": "number",
            "format": "double",
            "nullable": true
          }
        }
      },
      "AiDto": {
        "required": [
          "enabled"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          }
        }
      },
      "ApiProblem": {
        "required": [
          "type",
          "title",
          "status",
          "code"
        ],
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer",
            "format": "int32"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "description": "Stabil maskinläsbar kod, till exempel not_found, read_only, precondition_failed."
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "Fältfel: fältnamn till lista med meddelanden."
          },
          "traceId": {
            "type": "string",
            "description": "Går att söka på i serverloggen."
          },
          "reference": {
            "type": "string",
            "description": "Felreferensen vid 500, till exempel HV-7K2P9. Visa den för användaren: samma nummer står i felloggen och kan uppges under Tyck till."
          },
          "current": {
            "type": "object",
            "description": "Den aktuella resursen vid 412."
          }
        },
        "description": "Alla fel under /api/v1 (RFC 9457, application/problem+json). Växla på code; title och detail är svensk text som kan visas som den är."
      },
      "ApplianceBody": {
        "required": [
          "name",
          "roomId",
          "manufacturer",
          "model",
          "category",
          "serialNumber",
          "purchasedAt",
          "warrantyUntil",
          "notes"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "roomId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "manufacturer": {
            "type": "string",
            "nullable": true
          },
          "model": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "serialNumber": {
            "type": "string",
            "nullable": true
          },
          "purchasedAt": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "warrantyUntil": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "purchasePriceKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "clearPurchasePrice": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "ApplianceDetailDto": {
        "required": [
          "appliance",
          "manuals",
          "photoIds",
          "maintenance"
        ],
        "type": "object",
        "properties": {
          "appliance": {
            "$ref": "#/components/schemas/ApplianceDto"
          },
          "manuals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManualRefDto"
            }
          },
          "photoIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "maintenance": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MaintItemDto"
            }
          }
        }
      },
      "ApplianceDto": {
        "required": [
          "id",
          "name",
          "roomId",
          "roomName",
          "manufacturer",
          "model",
          "category",
          "serialNumber",
          "purchasedAt",
          "warrantyUntil",
          "warrantyState",
          "warrantyLabel",
          "notes",
          "createdAt",
          "maintCount",
          "purchasePriceKr"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "roomId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "roomName": {
            "type": "string",
            "nullable": true
          },
          "manufacturer": {
            "type": "string",
            "nullable": true
          },
          "model": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "serialNumber": {
            "type": "string",
            "nullable": true
          },
          "purchasedAt": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "warrantyUntil": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "warrantyState": {
            "type": "string"
          },
          "warrantyLabel": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time"
          },
          "maintCount": {
            "type": "integer",
            "format": "int32"
          },
          "purchasePriceKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "ApplianceListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApplianceDto"
            }
          }
        }
      },
      "AskBody": {
        "required": [
          "question",
          "history"
        ],
        "type": "object",
        "properties": {
          "question": {
            "type": "string",
            "nullable": true
          },
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AskExchangeBody"
            },
            "nullable": true
          }
        }
      },
      "AskExchangeBody": {
        "required": [
          "q",
          "a"
        ],
        "type": "object",
        "properties": {
          "q": {
            "type": "string",
            "nullable": true
          },
          "a": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "AskQuotaDto": {
        "required": [
          "enabled",
          "remaining",
          "limit"
        ],
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "remaining": {
            "type": "integer",
            "format": "int32"
          },
          "limit": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "AskResponse": {
        "required": [
          "text",
          "sources",
          "remaining",
          "truncated"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AskSourceDto"
            }
          },
          "remaining": {
            "type": "integer",
            "format": "int32"
          },
          "truncated": {
            "type": "boolean"
          }
        }
      },
      "AskSourceDto": {
        "required": [
          "label",
          "kind",
          "manualId",
          "page",
          "url"
        ],
        "type": "object",
        "properties": {
          "label": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "manualId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "page": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "url": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "AssigneeBody": {
        "required": [
          "assigneeId"
        ],
        "type": "object",
        "properties": {
          "assigneeId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "BillingDto": {
        "required": [
          "status",
          "period",
          "amount",
          "currentPeriodEnd",
          "cancelAtPeriodEnd",
          "renewsAt",
          "paymentFailed",
          "plusUntil"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "period": {
            "type": "string"
          },
          "amount": {
            "type": "integer",
            "format": "int32"
          },
          "currentPeriodEnd": {
            "format": "date-time"
          },
          "cancelAtPeriodEnd": {
            "type": "boolean"
          },
          "renewsAt": {
            "format": "date-time"
          },
          "paymentFailed": {
            "type": "boolean"
          },
          "plusUntil": {
            "format": "date-time"
          }
        }
      },
      "BuyerLinkBody": {
        "required": [
          "days",
          "showHouseName",
          "paperIds"
        ],
        "type": "object",
        "properties": {
          "days": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "showHouseName": {
            "type": "boolean",
            "nullable": true
          },
          "paperIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          }
        }
      },
      "BuyerLinkCreatedDto": {
        "required": [
          "id",
          "url",
          "validUntil",
          "showHouseName"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "url": {
            "type": "string"
          },
          "validUntil": {
            "format": "date-time"
          },
          "showHouseName": {
            "type": "boolean"
          }
        }
      },
      "BuyerLinkDto": {
        "required": [
          "id",
          "createdAt",
          "validUntil",
          "createdBy",
          "showHouseName",
          "openCount",
          "lastOpenedAt",
          "paperIds"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "format": "date-time"
          },
          "validUntil": {
            "format": "date-time"
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "showHouseName": {
            "type": "boolean"
          },
          "openCount": {
            "type": "integer",
            "format": "int32"
          },
          "lastOpenedAt": {
            "format": "date-time"
          },
          "paperIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          }
        }
      },
      "BuyerLinkListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BuyerLinkDto"
            }
          }
        }
      },
      "CalendarEventDto": {
        "required": [
          "date",
          "kind",
          "title",
          "detail",
          "target",
          "targetId",
          "late",
          "wholeMonth",
          "repeat"
        ],
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date"
          },
          "kind": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "target": {
            "type": "string"
          },
          "targetId": {
            "type": "integer",
            "format": "int32"
          },
          "late": {
            "type": "boolean"
          },
          "wholeMonth": {
            "type": "boolean"
          },
          "repeat": {
            "type": "boolean"
          },
          "assigneeId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "CalendarEventsResponse": {
        "required": [
          "from",
          "to",
          "items"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CalendarEventDto"
            }
          }
        }
      },
      "CalendarKeyDto": {
        "required": [
          "url",
          "webcalUrl",
          "since"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "webcalUrl": {
            "type": "string"
          },
          "since": {
            "format": "date-time"
          }
        }
      },
      "CalendarStatusDto": {
        "required": [
          "active",
          "since"
        ],
        "type": "object",
        "properties": {
          "active": {
            "type": "boolean"
          },
          "since": {
            "format": "date-time"
          }
        }
      },
      "CommentBody": {
        "required": [
          "text"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CommentDto": {
        "required": [
          "id",
          "text",
          "authorId",
          "authorName",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "text": {
            "type": "string"
          },
          "authorId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "authorName": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time"
          }
        }
      },
      "CommentListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CommentDto"
            }
          }
        }
      },
      "ContractDto": {
        "required": [
          "id",
          "kind",
          "kindLabel",
          "provider",
          "name",
          "costKr",
          "costPeriod",
          "yearlyKr",
          "startedAt",
          "endsAt",
          "noticeMonths",
          "lastNoticeDay",
          "daysLeft",
          "state",
          "stateLabel",
          "notes",
          "applianceId",
          "applianceName",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "kind": {
            "type": "string"
          },
          "kindLabel": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "costKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "costPeriod": {
            "type": "string"
          },
          "yearlyKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "startedAt": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "endsAt": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "noticeMonths": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "lastNoticeDay": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "daysLeft": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "state": {
            "type": "string"
          },
          "stateLabel": {
            "type": "string"
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "applianceId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "applianceName": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time"
          }
        }
      },
      "ContractListResponse": {
        "required": [
          "items",
          "totalYearlyKr",
          "windowDays"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ContractDto"
            }
          },
          "totalYearlyKr": {
            "type": "integer",
            "format": "int64"
          },
          "windowDays": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "CraftsmanBody": {
        "required": [
          "name",
          "trade",
          "phone",
          "email",
          "notes"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "trade": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CraftsmanDto": {
        "required": [
          "id",
          "name",
          "trade",
          "phone",
          "email",
          "notes",
          "createdAt",
          "logCount"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "trade": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time"
          },
          "logCount": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "CraftsmanListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CraftsmanDto"
            }
          }
        }
      },
      "CreateMaintBody": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "dueOn": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "intervalMonths": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "roomId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "applianceId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "DeviceBody": {
        "required": [
          "name",
          "platform",
          "appVersion",
          "pushToken"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "platform": {
            "type": "string",
            "nullable": true
          },
          "appVersion": {
            "type": "string",
            "nullable": true
          },
          "pushToken": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "DeviceDto": {
        "required": [
          "id",
          "name",
          "platform",
          "appVersion",
          "createdAt",
          "lastUsedAt",
          "current"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "platform": {
            "type": "string"
          },
          "appVersion": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time"
          },
          "lastUsedAt": {
            "format": "date-time"
          },
          "current": {
            "type": "boolean"
          }
        }
      },
      "DeviceListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DeviceDto"
            }
          }
        }
      },
      "FeaturesDto": {
        "required": [
          "ai",
          "push"
        ],
        "type": "object",
        "properties": {
          "ai": {
            "type": "boolean"
          },
          "push": {
            "type": "boolean"
          }
        }
      },
      "HealthResponse": {
        "required": [
          "status",
          "apiVersion"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "apiVersion": {
            "type": "string"
          }
        }
      },
      "HouseDto": {
        "required": [
          "id",
          "name",
          "houseType",
          "year",
          "budgetPerYearTkr",
          "reminderLeadDays",
          "role",
          "features"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "houseType": {
            "type": "string"
          },
          "year": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "budgetPerYearTkr": {
            "type": "integer",
            "format": "int32"
          },
          "reminderLeadDays": {
            "type": "integer",
            "format": "int32"
          },
          "role": {
            "type": "string"
          },
          "features": {
            "$ref": "#/components/schemas/HouseFeaturesDto"
          }
        }
      },
      "HouseFeaturesDto": {
        "required": [
          "ventilation",
          "heating",
          "foundation",
          "roof",
          "water",
          "sewage",
          "fireplace",
          "poolOrSpa",
          "facade",
          "garage",
          "deck",
          "hedge",
          "attic",
          "balcony",
          "has",
          "hasNot",
          "tenure"
        ],
        "type": "object",
        "properties": {
          "ventilation": {
            "type": "string",
            "nullable": true
          },
          "heating": {
            "type": "string",
            "nullable": true
          },
          "foundation": {
            "type": "string",
            "nullable": true
          },
          "roof": {
            "type": "string",
            "nullable": true
          },
          "water": {
            "type": "string",
            "nullable": true
          },
          "sewage": {
            "type": "string",
            "nullable": true
          },
          "fireplace": {
            "type": "boolean",
            "nullable": true
          },
          "poolOrSpa": {
            "type": "boolean",
            "nullable": true
          },
          "facade": {
            "type": "string",
            "nullable": true
          },
          "garage": {
            "type": "string",
            "nullable": true
          },
          "deck": {
            "type": "boolean",
            "nullable": true
          },
          "hedge": {
            "type": "boolean",
            "nullable": true
          },
          "attic": {
            "type": "boolean",
            "nullable": true
          },
          "balcony": {
            "type": "boolean",
            "nullable": true
          },
          "has": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "hasNot": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tenure": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "HouseFeaturesPatchBody": {
        "type": "object",
        "properties": {
          "has": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "hasNot": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "unknown": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "heating": {
            "type": "string",
            "nullable": true
          },
          "tenure": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "HouseInviteDto": {
        "required": [
          "id",
          "email",
          "role",
          "expiresAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "email": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time"
          }
        }
      },
      "HouseInviteListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HouseInviteDto"
            }
          }
        }
      },
      "HouseListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HouseDto"
            }
          }
        }
      },
      "HousePatchBody": {
        "required": [
          "name",
          "reminderLeadDays",
          "reminderChannel"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "reminderLeadDays": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "reminderChannel": {
            "type": "string",
            "nullable": true
          },
          "features": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/HouseFeaturesPatchBody"
              }
            ]
          }
        }
      },
      "HouseRoomFactListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomFactGroupDto"
            }
          }
        }
      },
      "IdeaArchiveResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IdeaDto"
            }
          }
        }
      },
      "IdeaBudgetLineDto": {
        "required": [
          "ideaId",
          "title",
          "roomName",
          "horizonYear",
          "doneOn",
          "logEntryId",
          "budgetMinKr",
          "budgetMaxKr",
          "actualKr",
          "logKr",
          "materialKr",
          "unpricedBoughtRows",
          "notBoughtRows",
          "status",
          "deviationKr",
          "percent",
          "text"
        ],
        "type": "object",
        "properties": {
          "ideaId": {
            "type": "integer",
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "roomName": {
            "type": "string"
          },
          "horizonYear": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "doneOn": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "logEntryId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "budgetMinKr": {
            "type": "integer",
            "format": "int64"
          },
          "budgetMaxKr": {
            "type": "integer",
            "format": "int64"
          },
          "actualKr": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "logKr": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "materialKr": {
            "type": "integer",
            "format": "int64"
          },
          "unpricedBoughtRows": {
            "type": "integer",
            "format": "int32"
          },
          "notBoughtRows": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string"
          },
          "deviationKr": {
            "type": "integer",
            "format": "int64"
          },
          "percent": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "text": {
            "type": "string"
          }
        }
      },
      "IdeaBudgetResponse": {
        "required": [
          "thisYear",
          "years",
          "someday",
          "past",
          "pastAverageKr",
          "houseBudgetPerYearKr",
          "done",
          "comparedCount",
          "comparedMinKr",
          "comparedMaxKr",
          "comparedActualKr",
          "deviationKr"
        ],
        "type": "object",
        "properties": {
          "thisYear": {
            "type": "integer",
            "format": "int32"
          },
          "years": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IdeaBudgetYearDto"
            }
          },
          "someday": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/IdeaBudgetYearDto"
              }
            ]
          },
          "past": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IdeaBudgetSpendDto"
            }
          },
          "pastAverageKr": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "houseBudgetPerYearKr": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "done": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IdeaBudgetLineDto"
            }
          },
          "comparedCount": {
            "type": "integer",
            "format": "int32"
          },
          "comparedMinKr": {
            "type": "integer",
            "format": "int64"
          },
          "comparedMaxKr": {
            "type": "integer",
            "format": "int64"
          },
          "comparedActualKr": {
            "type": "integer",
            "format": "int64"
          },
          "deviationKr": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "IdeaBudgetSpendDto": {
        "required": [
          "year",
          "kr",
          "soFar"
        ],
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "format": "int32"
          },
          "kr": {
            "type": "integer",
            "format": "int64"
          },
          "soFar": {
            "type": "boolean"
          }
        }
      },
      "IdeaBudgetYearDto": {
        "required": [
          "year",
          "minKr",
          "maxKr",
          "count",
          "withoutBudget",
          "carried"
        ],
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "minKr": {
            "type": "integer",
            "format": "int64"
          },
          "maxKr": {
            "type": "integer",
            "format": "int64"
          },
          "count": {
            "type": "integer",
            "format": "int32"
          },
          "withoutBudget": {
            "type": "integer",
            "format": "int32"
          },
          "carried": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "IdeaCoverBody": {
        "required": [
          "photoId"
        ],
        "type": "object",
        "properties": {
          "photoId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "IdeaDto": {
        "required": [
          "id",
          "roomId",
          "roomName",
          "title",
          "note",
          "horizonYear",
          "prio",
          "status",
          "costMinTkr",
          "costMaxTkr",
          "valueScore",
          "needsPro",
          "proNote",
          "link",
          "buildingPart",
          "authorId",
          "authorName",
          "createdAt",
          "lastEditedByName",
          "version",
          "likeCount",
          "likedByMe",
          "commentCount",
          "archivedAt",
          "photos",
          "coverPhotoId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "roomId": {
            "type": "integer",
            "format": "int32"
          },
          "roomName": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "horizonYear": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "prio": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "costMinTkr": {
            "type": "integer",
            "format": "int32"
          },
          "costMaxTkr": {
            "type": "integer",
            "format": "int32"
          },
          "valueScore": {
            "type": "integer",
            "format": "int32"
          },
          "needsPro": {
            "type": "boolean"
          },
          "proNote": {
            "type": "string",
            "nullable": true
          },
          "link": {
            "type": "string",
            "nullable": true
          },
          "buildingPart": {
            "type": "string",
            "nullable": true
          },
          "authorId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "authorName": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time"
          },
          "lastEditedByName": {
            "type": "string",
            "nullable": true
          },
          "version": {
            "type": "integer",
            "format": "int32"
          },
          "likeCount": {
            "type": "integer",
            "format": "int32"
          },
          "likedByMe": {
            "type": "boolean"
          },
          "commentCount": {
            "type": "integer",
            "format": "int32"
          },
          "archivedAt": {
            "format": "date-time"
          },
          "photos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PhotoDto"
            }
          },
          "coverPhotoId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "actualKr": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "budgetStatus": {
            "type": "string",
            "nullable": true
          },
          "budgetDeviationKr": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "assigneeId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "IdeaInput": {
        "required": [
          "roomId",
          "title",
          "note",
          "horizonYear",
          "prio",
          "costMinTkr",
          "costMaxTkr",
          "valueScore",
          "needsPro",
          "link"
        ],
        "type": "object",
        "properties": {
          "roomId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "horizonYear": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "prio": {
            "type": "string",
            "nullable": true
          },
          "costMinTkr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "costMaxTkr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "valueScore": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "needsPro": {
            "type": "boolean",
            "nullable": true
          },
          "link": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "IdeaListResponse": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IdeaDto"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "IdeaPatchInput": {
        "required": [
          "roomId",
          "title",
          "note",
          "horizonYear",
          "clearHorizon",
          "prio",
          "costMinTkr",
          "costMaxTkr",
          "valueScore",
          "needsPro",
          "link"
        ],
        "type": "object",
        "properties": {
          "roomId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "horizonYear": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "clearHorizon": {
            "type": "boolean",
            "nullable": true
          },
          "prio": {
            "type": "string",
            "nullable": true
          },
          "costMinTkr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "costMaxTkr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "valueScore": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "needsPro": {
            "type": "boolean",
            "nullable": true
          },
          "link": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "IdeaStatusBody": {
        "required": [
          "status"
        ],
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "IFormFile": {
        "type": "string",
        "format": "binary"
      },
      "ImprovementsResponse": {
        "required": [
          "totalKr",
          "count",
          "missingReceipt",
          "missingCost",
          "perYear",
          "items",
          "disclaimer"
        ],
        "type": "object",
        "properties": {
          "totalKr": {
            "type": "integer",
            "format": "int64"
          },
          "count": {
            "type": "integer",
            "format": "int32"
          },
          "missingReceipt": {
            "type": "integer",
            "format": "int32"
          },
          "missingCost": {
            "type": "integer",
            "format": "int32"
          },
          "perYear": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImprovementYearDto"
            }
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogEntryDto"
            }
          },
          "disclaimer": {
            "type": "string"
          }
        }
      },
      "ImprovementYearDto": {
        "required": [
          "year",
          "totalKr",
          "count"
        ],
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "format": "int32"
          },
          "totalKr": {
            "type": "integer",
            "format": "int64"
          },
          "count": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "InspectionDto": {
        "required": [
          "id",
          "name",
          "sizeBytes",
          "pages",
          "uploadedAt",
          "uploadedBy"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "pages": {
            "type": "integer",
            "format": "int32"
          },
          "uploadedAt": {
            "format": "date-time"
          },
          "uploadedBy": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "InspectionListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InspectionDto"
            }
          }
        }
      },
      "InviteMemberBody": {
        "required": [
          "nameOrEmail",
          "role"
        ],
        "type": "object",
        "properties": {
          "nameOrEmail": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "InvitePendingDto": {
        "required": [
          "invite"
        ],
        "type": "object",
        "properties": {
          "invite": {
            "$ref": "#/components/schemas/HouseInviteDto"
          }
        }
      },
      "LastDoneBody": {
        "required": [
          "date"
        ],
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        }
      },
      "LikeDto": {
        "required": [
          "liked",
          "count"
        ],
        "type": "object",
        "properties": {
          "liked": {
            "type": "boolean"
          },
          "count": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "LogEntryDto": {
        "required": [
          "id",
          "date",
          "what",
          "component",
          "kind",
          "costKr",
          "isImprovement",
          "contractor",
          "phone",
          "warrantyUntil",
          "buildingPart",
          "authorName",
          "hasReceipt",
          "receiptPhotoId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "what": {
            "type": "string"
          },
          "component": {
            "type": "string",
            "nullable": true
          },
          "kind": {
            "type": "string"
          },
          "costKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isImprovement": {
            "type": "boolean"
          },
          "contractor": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "warrantyUntil": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "buildingPart": {
            "type": "string",
            "nullable": true
          },
          "authorName": {
            "type": "string",
            "nullable": true
          },
          "hasReceipt": {
            "type": "boolean"
          },
          "receiptPhotoId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "craftsmanId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "craftsmanName": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "LogListResponse": {
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LogEntryDto"
            }
          },
          "nextCursor": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "MaintItemDto": {
        "required": [
          "id",
          "name",
          "intervalMonths",
          "intervalLabel",
          "lastDoneAt",
          "nextDueAt",
          "daysLeft",
          "state",
          "dueLabel",
          "source",
          "isGuideline",
          "applianceId",
          "applianceName",
          "once",
          "editable",
          "roomId",
          "roomName",
          "note"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "intervalMonths": {
            "type": "integer",
            "format": "int32"
          },
          "intervalLabel": {
            "type": "string"
          },
          "lastDoneAt": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "nextDueAt": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "daysLeft": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "state": {
            "type": "string"
          },
          "dueLabel": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "isGuideline": {
            "type": "boolean"
          },
          "applianceId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "applianceName": {
            "type": "string",
            "nullable": true
          },
          "once": {
            "type": "boolean"
          },
          "editable": {
            "type": "boolean"
          },
          "roomId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "roomName": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "assigneeId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "MaintListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MaintItemDto"
            }
          }
        }
      },
      "ManualDto": {
        "required": [
          "id",
          "applianceId",
          "applianceName",
          "name",
          "pages",
          "sizeBytes",
          "sourceUrl",
          "addedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "applianceId": {
            "type": "integer",
            "format": "int32"
          },
          "applianceName": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "pages": {
            "type": "integer",
            "format": "int32"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "sourceUrl": {
            "type": "string",
            "nullable": true
          },
          "addedAt": {
            "format": "date-time"
          }
        }
      },
      "ManualHitDto": {
        "required": [
          "manualId",
          "applianceId",
          "applianceName",
          "manualName",
          "page",
          "snippet"
        ],
        "type": "object",
        "properties": {
          "manualId": {
            "type": "integer",
            "format": "int32"
          },
          "applianceId": {
            "type": "integer",
            "format": "int32"
          },
          "applianceName": {
            "type": "string"
          },
          "manualName": {
            "type": "string"
          },
          "page": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "snippet": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SnippetPartDto"
            }
          }
        }
      },
      "ManualListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManualDto"
            }
          }
        }
      },
      "ManualRefDto": {
        "required": [
          "id",
          "name",
          "pages"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "pages": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ManualSearchResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ManualHitDto"
            }
          }
        }
      },
      "MarkDoneBody": {
        "required": [
          "doneOn"
        ],
        "type": "object",
        "properties": {
          "doneOn": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "costKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "MarkDoneResponse": {
        "required": [
          "item",
          "logEntry",
          "removed"
        ],
        "type": "object",
        "properties": {
          "item": {
            "$ref": "#/components/schemas/MaintItemDto"
          },
          "logEntry": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/LogEntryDto"
              }
            ]
          },
          "removed": {
            "type": "boolean"
          }
        }
      },
      "MaterialDto": {
        "required": [
          "id",
          "ideaId",
          "text",
          "amount",
          "priceKr",
          "bought",
          "createdAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "ideaId": {
            "type": "integer",
            "format": "int32"
          },
          "text": {
            "type": "string"
          },
          "amount": {
            "type": "string",
            "nullable": true
          },
          "priceKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "bought": {
            "type": "boolean"
          },
          "createdAt": {
            "format": "date-time"
          }
        }
      },
      "MaterialListResponse": {
        "required": [
          "items",
          "totalKr",
          "unpricedCount",
          "toBuyCount"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MaterialDto"
            }
          },
          "totalKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "unpricedCount": {
            "type": "integer",
            "format": "int32"
          },
          "toBuyCount": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "MeHouseDto": {
        "required": [
          "id",
          "name",
          "role"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "MemberDto": {
        "required": [
          "id",
          "name",
          "role",
          "expiresAt",
          "email"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time"
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "MemberListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MemberDto"
            }
          }
        }
      },
      "MemberRoleBody": {
        "required": [
          "role"
        ],
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "MeResponse": {
        "required": [
          "id",
          "name",
          "email",
          "houses",
          "ai"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "houses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeHouseDto"
            }
          },
          "ai": {
            "$ref": "#/components/schemas/AiDto"
          }
        }
      },
      "MetaResponse": {
        "required": [
          "apiVersion",
          "minClientVersion",
          "features"
        ],
        "type": "object",
        "properties": {
          "apiVersion": {
            "type": "string"
          },
          "minClientVersion": {
            "type": "string",
            "nullable": true
          },
          "features": {
            "$ref": "#/components/schemas/FeaturesDto"
          }
        }
      },
      "MeterAnomalyDto": {
        "required": [
          "meterId",
          "meterName",
          "unit",
          "period"
        ],
        "type": "object",
        "properties": {
          "meterId": {
            "type": "integer",
            "format": "int32"
          },
          "meterName": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "period": {
            "$ref": "#/components/schemas/MeterPeriodDto"
          }
        }
      },
      "MeterAnomalyListResponse": {
        "required": [
          "items",
          "highFactor"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeterAnomalyDto"
            }
          },
          "highFactor": {
            "type": "number",
            "format": "double"
          }
        }
      },
      "MeterConsumptionResponse": {
        "required": [
          "meter",
          "months",
          "periods"
        ],
        "type": "object",
        "properties": {
          "meter": {
            "$ref": "#/components/schemas/MeterDto"
          },
          "months": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeterMonthDto"
            }
          },
          "periods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeterPeriodDto"
            }
          }
        }
      },
      "MeterDto": {
        "required": [
          "id",
          "kind",
          "name",
          "unit",
          "readingCount",
          "latestReading",
          "latestPeriod"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "readingCount": {
            "type": "integer",
            "format": "int32"
          },
          "latestReading": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/MeterReadingDto"
              }
            ]
          },
          "latestPeriod": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/MeterPeriodDto"
              }
            ]
          }
        }
      },
      "MeterListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeterDto"
            }
          }
        }
      },
      "MeterMonthDto": {
        "required": [
          "year",
          "month",
          "amount",
          "coveredDays",
          "daysInMonth",
          "partial"
        ],
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "format": "int32"
          },
          "month": {
            "type": "integer",
            "format": "int32"
          },
          "amount": {
            "type": "number",
            "format": "double"
          },
          "coveredDays": {
            "type": "integer",
            "format": "int32"
          },
          "daysInMonth": {
            "type": "integer",
            "format": "int32"
          },
          "partial": {
            "type": "boolean"
          }
        }
      },
      "MeterPeriodDto": {
        "required": [
          "from",
          "to",
          "days",
          "amount",
          "perDay",
          "high",
          "reset"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date"
          },
          "to": {
            "type": "string",
            "format": "date"
          },
          "days": {
            "type": "integer",
            "format": "int32"
          },
          "amount": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "perDay": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "high": {
            "type": "boolean"
          },
          "reset": {
            "type": "boolean"
          }
        }
      },
      "MeterReadingAddedResponse": {
        "required": [
          "reading",
          "meter",
          "meterCreated"
        ],
        "type": "object",
        "properties": {
          "reading": {
            "$ref": "#/components/schemas/MeterReadingDto"
          },
          "meter": {
            "$ref": "#/components/schemas/MeterDto"
          },
          "meterCreated": {
            "type": "boolean"
          }
        }
      },
      "MeterReadingDeletedResponse": {
        "required": [
          "id",
          "meterRemoved"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "meterRemoved": {
            "type": "boolean"
          }
        }
      },
      "MeterReadingDto": {
        "required": [
          "id",
          "meterId",
          "date",
          "value",
          "authorName",
          "createdAt",
          "sincePrevious"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "meterId": {
            "type": "integer",
            "format": "int32"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "value": {
            "type": "number",
            "format": "double"
          },
          "authorName": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "format": "date-time"
          },
          "sincePrevious": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/MeterPeriodDto"
              }
            ]
          }
        }
      },
      "MeterReadingListResponse": {
        "required": [
          "meter",
          "items"
        ],
        "type": "object",
        "properties": {
          "meter": {
            "$ref": "#/components/schemas/MeterDto"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MeterReadingDto"
            }
          }
        }
      },
      "MyInviteDto": {
        "required": [
          "id",
          "houseId",
          "houseName",
          "fromName",
          "role",
          "expiresAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "houseId": {
            "type": "integer",
            "format": "int32"
          },
          "houseName": {
            "type": "string"
          },
          "fromName": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time"
          }
        }
      },
      "MyInviteListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MyInviteDto"
            }
          }
        }
      },
      "OutlookGapDto": {
        "required": [
          "name",
          "why"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "why": {
            "type": "string"
          }
        }
      },
      "OutlookItemDto": {
        "required": [
          "kind",
          "name",
          "times",
          "minKr",
          "maxKr",
          "windowFromYear",
          "windowToYear",
          "basis"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "times": {
            "type": "integer",
            "format": "int32"
          },
          "minKr": {
            "type": "integer",
            "format": "int32"
          },
          "maxKr": {
            "type": "integer",
            "format": "int32"
          },
          "windowFromYear": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "windowToYear": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "basis": {
            "type": "string"
          }
        }
      },
      "OutlookResponse": {
        "required": [
          "fromYear",
          "toYear",
          "budgetPerYearKr",
          "totalMinKr",
          "totalMaxKr",
          "years",
          "gaps",
          "uncostedTasks",
          "beyondHorizon",
          "disclaimer"
        ],
        "type": "object",
        "properties": {
          "fromYear": {
            "type": "integer",
            "format": "int32"
          },
          "toYear": {
            "type": "integer",
            "format": "int32"
          },
          "budgetPerYearKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "totalMinKr": {
            "type": "integer",
            "format": "int32"
          },
          "totalMaxKr": {
            "type": "integer",
            "format": "int32"
          },
          "years": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutlookYearDto"
            }
          },
          "gaps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutlookGapDto"
            }
          },
          "uncostedTasks": {
            "type": "integer",
            "format": "int32"
          },
          "beyondHorizon": {
            "type": "integer",
            "format": "int32"
          },
          "disclaimer": {
            "type": "string"
          }
        }
      },
      "OutlookYearDto": {
        "required": [
          "year",
          "minKr",
          "maxKr",
          "budget",
          "items"
        ],
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "format": "int32"
          },
          "minKr": {
            "type": "integer",
            "format": "int32"
          },
          "maxKr": {
            "type": "integer",
            "format": "int32"
          },
          "budget": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OutlookItemDto"
            }
          }
        }
      },
      "PaperDto": {
        "required": [
          "id",
          "kind",
          "title",
          "date",
          "validUntil",
          "validity",
          "fileName",
          "contentType",
          "sizeBytes",
          "uploadedBy",
          "url"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "kind": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "validUntil": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "validity": {
            "type": "string",
            "nullable": true
          },
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "sizeBytes": {
            "type": "integer",
            "format": "int64"
          },
          "uploadedBy": {
            "type": "string",
            "nullable": true
          },
          "url": {
            "type": "string"
          }
        }
      },
      "PaperGroupDto": {
        "required": [
          "kind",
          "label",
          "items"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaperDto"
            }
          }
        }
      },
      "PaperListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaperGroupDto"
            }
          }
        }
      },
      "PaperPatchBody": {
        "required": [
          "kind",
          "title",
          "date",
          "validUntil",
          "clearValidUntil"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "validUntil": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "clearValidUntil": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "PaperUploadForm": {
        "required": [
          "file",
          "kind",
          "title",
          "date",
          "validUntil"
        ],
        "type": "object",
        "properties": {
          "file": {
            "$ref": "#/components/schemas/IFormFile"
          },
          "kind": {
            "type": "string"
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "validUntil": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        }
      },
      "PatchContractBody": {
        "required": [
          "kind",
          "provider",
          "costKr",
          "costPeriod",
          "startedAt",
          "endsAt",
          "bindingMonths",
          "noticeMonths",
          "notes",
          "applianceId"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "nullable": true
          },
          "provider": {
            "type": "string",
            "nullable": true
          },
          "costKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "costPeriod": {
            "type": "string",
            "nullable": true
          },
          "startedAt": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "endsAt": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "bindingMonths": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "noticeMonths": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          },
          "applianceId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "clearCost": {
            "type": "boolean",
            "nullable": true
          },
          "clearStartedAt": {
            "type": "boolean",
            "nullable": true
          },
          "clearEndsAt": {
            "type": "boolean",
            "nullable": true
          },
          "clearAppliance": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "PatchLogBody": {
        "required": [
          "costKr",
          "clearCost",
          "isImprovement",
          "buildingPart"
        ],
        "type": "object",
        "properties": {
          "costKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "clearCost": {
            "type": "boolean",
            "nullable": true
          },
          "isImprovement": {
            "type": "boolean",
            "nullable": true
          },
          "buildingPart": {
            "type": "string",
            "nullable": true
          },
          "craftsmanId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "clearCraftsman": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "PatchMaterialBody": {
        "required": [
          "text",
          "amount",
          "priceKr",
          "clearPrice"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "nullable": true
          },
          "amount": {
            "type": "string",
            "nullable": true
          },
          "priceKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "clearPrice": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "PhotoDto": {
        "required": [
          "id",
          "url",
          "takenAt",
          "roomId",
          "logEntryId",
          "applianceId",
          "isReceipt",
          "ideaId",
          "isCover"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "url": {
            "type": "string"
          },
          "takenAt": {
            "type": "string",
            "format": "date"
          },
          "roomId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "logEntryId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "applianceId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isReceipt": {
            "type": "boolean"
          },
          "ideaId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "isCover": {
            "type": "boolean"
          }
        }
      },
      "PlanDto": {
        "required": [
          "plan",
          "enforced",
          "maxMembers",
          "aiCallsPerMonth",
          "pdfMarked",
          "canTransfer",
          "maxReceipts",
          "members",
          "aiUsed",
          "receipts",
          "maxFiles",
          "files",
          "contractWatch",
          "aiAssistant",
          "craftsmanLinks",
          "trialUntil",
          "trialUsed"
        ],
        "type": "object",
        "properties": {
          "plan": {
            "type": "string"
          },
          "enforced": {
            "type": "boolean"
          },
          "maxMembers": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "aiCallsPerMonth": {
            "type": "integer",
            "format": "int32"
          },
          "pdfMarked": {
            "type": "boolean"
          },
          "canTransfer": {
            "type": "boolean"
          },
          "maxReceipts": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "members": {
            "type": "integer",
            "format": "int32"
          },
          "aiUsed": {
            "type": "integer",
            "format": "int32"
          },
          "receipts": {
            "type": "integer",
            "format": "int32"
          },
          "maxFiles": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "files": {
            "type": "integer",
            "format": "int32"
          },
          "contractWatch": {
            "type": "boolean"
          },
          "aiAssistant": {
            "type": "boolean"
          },
          "craftsmanLinks": {
            "type": "boolean"
          },
          "trialUntil": {
            "format": "date-time"
          },
          "trialUsed": {
            "type": "boolean"
          },
          "billing": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/BillingDto"
              }
            ]
          }
        }
      },
      "PushRegistrationBody": {
        "required": [
          "pushToken",
          "environment",
          "appVersion"
        ],
        "type": "object",
        "properties": {
          "pushToken": {
            "type": "string",
            "nullable": true
          },
          "environment": {
            "type": "string",
            "nullable": true
          },
          "appVersion": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "RedeemBody": {
        "required": [
          "email",
          "code",
          "name",
          "device"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": true
          },
          "code": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "device": {
            "oneOf": [
              {
                "enum": [
                  null
                ],
                "nullable": true
              },
              {
                "$ref": "#/components/schemas/DeviceBody"
              }
            ]
          }
        }
      },
      "RequestCodeBody": {
        "required": [
          "email"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "RoomBody": {
        "required": [
          "name",
          "floor"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "floor": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "RoomDto": {
        "required": [
          "id",
          "name",
          "floor",
          "sortOrder"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "floor": {
            "type": "string"
          },
          "sortOrder": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "RoomFactBody": {
        "required": [
          "kind",
          "value",
          "note",
          "doneOn"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "doneOn": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        }
      },
      "RoomFactDto": {
        "required": [
          "id",
          "roomId",
          "kind",
          "kindLabel",
          "value",
          "note",
          "doneOn",
          "updatedAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "roomId": {
            "type": "integer",
            "format": "int32"
          },
          "kind": {
            "type": "string"
          },
          "kindLabel": {
            "type": "string"
          },
          "value": {
            "type": "string"
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "doneOn": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "updatedAt": {
            "format": "date-time"
          }
        }
      },
      "RoomFactGroupDto": {
        "required": [
          "roomId",
          "roomName",
          "floor",
          "facts"
        ],
        "type": "object",
        "properties": {
          "roomId": {
            "type": "integer",
            "format": "int32"
          },
          "roomName": {
            "type": "string"
          },
          "floor": {
            "type": "string"
          },
          "facts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomFactDto"
            }
          }
        }
      },
      "RoomFactListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomFactDto"
            }
          }
        }
      },
      "RoomFactPatchBody": {
        "required": [
          "kind",
          "value",
          "note",
          "doneOn",
          "clearDoneOn"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "doneOn": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "clearDoneOn": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "RoomListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RoomDto"
            }
          }
        }
      },
      "SearchGroupDto": {
        "required": [
          "kind",
          "label",
          "total",
          "hits"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "total": {
            "type": "integer",
            "format": "int32"
          },
          "hits": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchHitDto"
            }
          }
        }
      },
      "SearchHitDto": {
        "required": [
          "kind",
          "id",
          "title",
          "detail",
          "webPath"
        ],
        "type": "object",
        "properties": {
          "kind": {
            "type": "string"
          },
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "title": {
            "type": "string"
          },
          "detail": {
            "type": "string"
          },
          "webPath": {
            "type": "string"
          }
        }
      },
      "SearchResponse": {
        "required": [
          "query",
          "count",
          "groups"
        ],
        "type": "object",
        "properties": {
          "query": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "format": "int32"
          },
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchGroupDto"
            }
          }
        }
      },
      "SessionDto": {
        "required": [
          "id",
          "kind",
          "label",
          "createdAt",
          "lastActiveAt",
          "current"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time"
          },
          "lastActiveAt": {
            "format": "date-time"
          },
          "current": {
            "type": "boolean"
          }
        }
      },
      "SessionListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SessionDto"
            }
          }
        }
      },
      "ShareLinkBody": {
        "required": [
          "ideaIds",
          "includePhotos"
        ],
        "type": "object",
        "properties": {
          "ideaIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "nullable": true
          },
          "includePhotos": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "ShareLinkCreatedDto": {
        "required": [
          "id",
          "url",
          "validUntil"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "url": {
            "type": "string"
          },
          "validUntil": {
            "format": "date-time"
          }
        }
      },
      "ShareLinkDto": {
        "required": [
          "id",
          "createdAt",
          "validUntil",
          "createdBy",
          "ideaIds",
          "ideaTitles",
          "includePhotos",
          "replies"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "createdAt": {
            "format": "date-time"
          },
          "validUntil": {
            "format": "date-time"
          },
          "createdBy": {
            "type": "string",
            "nullable": true
          },
          "ideaIds": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "ideaTitles": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "includePhotos": {
            "type": "boolean"
          },
          "replies": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ShareLinkListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShareLinkDto"
            }
          }
        }
      },
      "ShoppingGroupDto": {
        "required": [
          "ideaId",
          "ideaTitle",
          "roomName",
          "items",
          "totalKr",
          "unpricedCount"
        ],
        "type": "object",
        "properties": {
          "ideaId": {
            "type": "integer",
            "format": "int32"
          },
          "ideaTitle": {
            "type": "string"
          },
          "roomName": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MaterialDto"
            }
          },
          "totalKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "unpricedCount": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "ShoppingListResponse": {
        "required": [
          "groups",
          "toBuyCount",
          "totalKr"
        ],
        "type": "object",
        "properties": {
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShoppingGroupDto"
            }
          },
          "toBuyCount": {
            "type": "integer",
            "format": "int32"
          },
          "totalKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        }
      },
      "SnippetPartDto": {
        "required": [
          "text",
          "hit"
        ],
        "type": "object",
        "properties": {
          "text": {
            "type": "string"
          },
          "hit": {
            "type": "boolean"
          }
        }
      },
      "SuggestionDto": {
        "required": [
          "libraryId",
          "name",
          "intervalMonths",
          "intervalLabel"
        ],
        "type": "object",
        "properties": {
          "libraryId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "intervalMonths": {
            "type": "integer",
            "format": "int32"
          },
          "intervalLabel": {
            "type": "string"
          }
        }
      },
      "SuggestionListResponse": {
        "required": [
          "items"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SuggestionDto"
            }
          }
        }
      },
      "TodayCountsDto": {
        "required": [
          "overdue",
          "soon",
          "scheduled",
          "unscheduled",
          "rooms",
          "ideas",
          "plannedIdeas",
          "unreadActivity"
        ],
        "type": "object",
        "properties": {
          "overdue": {
            "type": "integer",
            "format": "int32"
          },
          "soon": {
            "type": "integer",
            "format": "int32"
          },
          "scheduled": {
            "type": "integer",
            "format": "int32"
          },
          "unscheduled": {
            "type": "integer",
            "format": "int32"
          },
          "rooms": {
            "type": "integer",
            "format": "int32"
          },
          "ideas": {
            "type": "integer",
            "format": "int32"
          },
          "plannedIdeas": {
            "type": "integer",
            "format": "int32"
          },
          "unreadActivity": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "TodayItemDto": {
        "required": [
          "id",
          "name",
          "intervalLabel",
          "state",
          "daysLeft",
          "nextDueAt"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "intervalLabel": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "daysLeft": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "nextDueAt": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        }
      },
      "TodayResponse": {
        "required": [
          "houseId",
          "houseName",
          "today",
          "mood",
          "counts",
          "next",
          "lastDoneOn"
        ],
        "type": "object",
        "properties": {
          "houseId": {
            "type": "integer",
            "format": "int32"
          },
          "houseName": {
            "type": "string"
          },
          "today": {
            "type": "string",
            "format": "date"
          },
          "mood": {
            "type": "string"
          },
          "counts": {
            "$ref": "#/components/schemas/TodayCountsDto"
          },
          "next": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TodayItemDto"
            }
          },
          "lastDoneOn": {
            "type": "string",
            "format": "date",
            "nullable": true
          }
        }
      },
      "TokenResponse": {
        "required": [
          "token",
          "expiresAt",
          "user",
          "device"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "expiresAt": {
            "format": "date-time"
          },
          "user": {
            "$ref": "#/components/schemas/UserDto"
          },
          "device": {
            "$ref": "#/components/schemas/DeviceDto"
          }
        }
      },
      "UpdateMaintBody": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "intervalMonths": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "dueOn": {
            "type": "string",
            "format": "date",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "roomId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "clearRoom": {
            "type": "boolean",
            "nullable": true
          },
          "applianceId": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "clearAppliance": {
            "type": "boolean",
            "nullable": true
          }
        }
      },
      "UpdateMeBody": {
        "required": [
          "name"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "UserDto": {
        "required": [
          "id",
          "name",
          "email"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        }
      },
      "WarrantyDto": {
        "required": [
          "source",
          "id",
          "name",
          "until",
          "daysLeft"
        ],
        "type": "object",
        "properties": {
          "source": {
            "type": "string"
          },
          "id": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "until": {
            "type": "string",
            "format": "date"
          },
          "daysLeft": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "WarrantyListResponse": {
        "required": [
          "items",
          "windowDays"
        ],
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WarrantyDto"
            }
          },
          "windowDays": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "YearImprovementDto": {
        "required": [
          "logId",
          "date",
          "what",
          "costKr",
          "hasReceipt"
        ],
        "type": "object",
        "properties": {
          "logId": {
            "type": "integer",
            "format": "int32"
          },
          "date": {
            "type": "string",
            "format": "date"
          },
          "what": {
            "type": "string"
          },
          "costKr": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "hasReceipt": {
            "type": "boolean"
          }
        }
      },
      "YearReviewResponse": {
        "required": [
          "year",
          "isCurrent",
          "years",
          "tasksDone",
          "distinctTasks",
          "renovationsDone",
          "late",
          "lateTasks",
          "neverDone",
          "neverTasks",
          "improvementTotalKr",
          "improvementMissingCost",
          "improvementMissingReceipt",
          "improvements",
          "rooms",
          "appliances",
          "warranties",
          "mood",
          "husseLine"
        ],
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "format": "int32"
          },
          "isCurrent": {
            "type": "boolean"
          },
          "years": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            }
          },
          "tasksDone": {
            "type": "integer",
            "format": "int32"
          },
          "distinctTasks": {
            "type": "integer",
            "format": "int32"
          },
          "renovationsDone": {
            "type": "integer",
            "format": "int32"
          },
          "late": {
            "type": "integer",
            "format": "int32"
          },
          "lateTasks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "neverDone": {
            "type": "integer",
            "format": "int32"
          },
          "neverTasks": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "improvementTotalKr": {
            "type": "integer",
            "format": "int64"
          },
          "improvementMissingCost": {
            "type": "integer",
            "format": "int32"
          },
          "improvementMissingReceipt": {
            "type": "integer",
            "format": "int32"
          },
          "improvements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/YearImprovementDto"
            }
          },
          "rooms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/YearTopDto"
            }
          },
          "appliances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/YearTopDto"
            }
          },
          "warranties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/YearWarrantyDto"
            }
          },
          "mood": {
            "type": "string"
          },
          "husseLine": {
            "type": "string"
          }
        }
      },
      "YearTopDto": {
        "required": [
          "name",
          "count"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "YearWarrantyDto": {
        "required": [
          "name",
          "until",
          "daysLeft"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "until": {
            "type": "string",
            "format": "date"
          },
          "daysLeft": {
            "type": "integer",
            "format": "int32"
          }
        }
      }
    },
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "description": "Enhetstoken från POST /auth/token.",
        "scheme": "bearer",
        "bearerFormat": "hk_live_…"
      }
    }
  },
  "security": [
    {
      "bearer": [ ]
    }
  ],
  "tags": [
    {
      "name": "activity"
    },
    {
      "name": "appliances"
    },
    {
      "name": "ask"
    },
    {
      "name": "auth"
    },
    {
      "name": "houses"
    },
    {
      "name": "me"
    },
    {
      "name": "photos"
    },
    {
      "name": "buyer-links"
    },
    {
      "name": "warranties"
    },
    {
      "name": "calendar"
    },
    {
      "name": "contracts"
    },
    {
      "name": "craftsmen"
    },
    {
      "name": "export"
    },
    {
      "name": "ideas"
    },
    {
      "name": "inspections"
    },
    {
      "name": "members"
    },
    {
      "name": "log"
    },
    {
      "name": "maintenance"
    },
    {
      "name": "manuals"
    },
    {
      "name": "materials"
    },
    {
      "name": "meters"
    },
    {
      "name": "outlook"
    },
    {
      "name": "papers"
    },
    {
      "name": "plan"
    },
    {
      "name": "rooms"
    },
    {
      "name": "search"
    },
    {
      "name": "share-links"
    },
    {
      "name": "year"
    },
    {
      "name": "meta"
    }
  ]
}