{
  "openapi" : "3.1.0",
  "components" : {
    "schemas" : {
      "Action" : {
        "type" : "string",
        "enum" : [ "ADD", "REMOVE" ]
      },
      "ActionDTO" : {
        "type" : "object",
        "required" : [ "action", "process" ],
        "properties" : {
          "action" : {
            "type" : [ "string", "null" ]
          },
          "process" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "AddDelegateProcessRoleDTO" : {
        "type" : "object",
        "required" : [ "usernames", "processRole" ],
        "properties" : {
          "usernames" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            },
            "minItems" : 1
          },
          "processRole" : {
            "$ref" : "#/components/schemas/WFProcessRole"
          }
        }
      },
      "AddressBookBulkUpdateDTO" : {
        "type" : "object",
        "required" : [ "idAddressBook", "newAddressBook" ],
        "properties" : {
          "idAddressBook" : {
            "type" : "string"
          },
          "newAddressBook" : {
            "$ref" : "#/components/schemas/NewAddressBookDTO"
          }
        }
      },
      "AddressBookDTO" : {
        "type" : "object",
        "required" : [ "id", "nation", "city", "foreignCity", "kindOfAddressBook", "street", "isPublicStreet", "streetNumber", "isPublicStreetNumber", "postalCode", "phoneNumber", "isPublicPhoneNumber", "faxNumber", "emailAddress", "isPublicEmailAddress", "webAddress", "idPerson", "hamlet", "careOf", "onlyMailIndicator", "correspondenceIndicator", "advanceCopies", "pecAddress", "note" ],
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "nation" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/NationDTO"
            }, {
              "type" : "null"
            } ]
          },
          "city" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/ItalianCityDTO"
            }, {
              "type" : "null"
            } ]
          },
          "foreignCity" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/ForeignCityDTO"
            }, {
              "type" : "null"
            } ]
          },
          "kindOfAddressBook" : {
            "$ref" : "#/components/schemas/KindOfAddressBookDTO"
          },
          "street" : {
            "type" : "string"
          },
          "isPublicStreet" : {
            "type" : "boolean"
          },
          "streetNumber" : {
            "type" : "string"
          },
          "isPublicStreetNumber" : {
            "type" : "boolean"
          },
          "postalCode" : {
            "type" : "string"
          },
          "phoneNumber" : {
            "type" : "string"
          },
          "isPublicPhoneNumber" : {
            "type" : "boolean"
          },
          "faxNumber" : {
            "type" : [ "string", "null" ]
          },
          "emailAddress" : {
            "type" : "string"
          },
          "isPublicEmailAddress" : {
            "type" : "boolean"
          },
          "webAddress" : {
            "type" : [ "string", "null" ]
          },
          "idPerson" : {
            "type" : [ "string", "null" ]
          },
          "hamlet" : {
            "type" : [ "string", "null" ]
          },
          "careOf" : {
            "type" : "string"
          },
          "onlyMailIndicator" : {
            "type" : [ "integer", "null" ],
            "format" : "int32"
          },
          "correspondenceIndicator" : {
            "type" : [ "integer", "null" ],
            "format" : "int32"
          },
          "advanceCopies" : {
            "type" : [ "integer", "null" ],
            "format" : "int32"
          },
          "pecAddress" : {
            "type" : [ "string", "null" ]
          },
          "note" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "AliveDTO" : {
        "type" : "object",
        "required" : [ "alive", "version", "environment", "dbhost", "profile" ],
        "properties" : {
          "alive" : {
            "type" : "boolean"
          },
          "version" : {
            "type" : [ "string", "null" ]
          },
          "environment" : {
            "type" : [ "string", "null" ]
          },
          "dbhost" : {
            "type" : [ "string", "null" ]
          },
          "profile" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "AttachmentDTO" : {
        "type" : "object",
        "required" : [ "name", "contentType", "data" ],
        "properties" : {
          "name" : {
            "type" : "string"
          },
          "contentType" : {
            "type" : "string"
          },
          "data" : {
            "type" : "string",
            "format" : "binary"
          }
        }
      },
      "AuthorizationScopeFilter" : {
        "type" : "string",
        "enum" : [ "PATENTS", "MARKS", "BOTH" ]
      },
      "BirthDateDTO" : {
        "type" : "object",
        "required" : [ "birthDate" ],
        "properties" : {
          "birthDate" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "BookmarkDTO" : {
        "type" : "object",
        "required" : [ "userId", "favoritesApplicationIdList", "personalAreaSearchList", "trendQueryList" ],
        "properties" : {
          "userId" : {
            "type" : "string"
          },
          "favoritesApplicationIdList" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "personalAreaSearchList" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PersonalAreaSearchDTO"
            }
          },
          "trendQueryList" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/StatisticalQueryDto"
            }
          }
        }
      },
      "ByPersonIdsRequestDTO" : {
        "description" : "Batch load users by natural person id (UibmUser.person._id) to avoid N+1 when the client already has person ids.",
        "type" : "object",
        "required" : [ "ids" ],
        "properties" : {
          "ids" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            },
            "description" : "Natural person ObjectIds (hex), max 200 per call",
            "minItems" : 1,
            "maxItems" : 200
          }
        }
      },
      "ChangePasswordDTO" : {
        "type" : "object",
        "required" : [ "username", "oldPassword", "newPassword" ],
        "properties" : {
          "username" : {
            "type" : "string"
          },
          "oldPassword" : {
            "type" : "string"
          },
          "newPassword" : {
            "type" : "string"
          }
        }
      },
      "ClassificationDto" : {
        "type" : "object",
        "properties" : {
          "type" : {
            "type" : [ "string", "null" ]
          },
          "code" : {
            "type" : [ "string", "null" ]
          },
          "id" : {
            "type" : [ "string", "null" ]
          },
          "ancestors" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/components/schemas/ClassificationDto"
            }
          },
          "family" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "CloseMembershipRequestDTO" : {
        "description" : "When idPersonNatural is set, the server returns 409 if it does not match the studies-group row (safety check). Omit the field to close the row identified only by idStudiesGroup.",
        "type" : "object",
        "properties" : {
          "idPersonNatural" : {
            "type" : [ "string", "null" ],
            "description" : "Optional mandatario id; must match this row's natural person if present."
          }
        }
      },
      "CloseSedeRequestDTO" : {
        "description" : "Disattiva all mandatario memberships at a sede: sets endingDate on every studies-group document for the pair (legal entity, address book). Cascades in one call (no need to close memberships first). Idempotent: rows already closed are left unchanged. Optional reason is accepted for client/audit but not stored in the current data model.",
        "type" : "object",
        "required" : [ "idPersonLegal", "idAddressBookLegal" ],
        "properties" : {
          "idPersonLegal" : {
            "type" : "string",
            "description" : "Legal entity (studi) id"
          },
          "idAddressBookLegal" : {
            "type" : "string",
            "description" : "Address book (sede) id"
          },
          "reason" : {
            "type" : [ "string", "null" ],
            "description" : "Optional note for clients; not persisted on the server."
          }
        }
      },
      "Codebases" : {
        "type" : "string",
        "enum" : [ "DIGITAL_IDENTITY", "COMMON", "CLASSIFICATION", "BFF" ]
      },
      "CreateStudiesGroupRequestDTO" : {
        "description" : "Create a studies-group row: one mandatario (natural person) at one legal entity (studio) sede (address book). Idempotent: same triple returns 200 and re-uses the row; if the row was soft-closed, it is re-opened (endingDate cleared). The address book must belong to the legal entity (AddressBook.idPerson = idPersonLegal).",
        "type" : "object",
        "required" : [ "idPersonLegal", "idPersonNatural", "idAddressBookLegal" ],
        "properties" : {
          "idPersonLegal" : {
            "type" : "string",
            "description" : "Legal entity (studio) id",
            "pattern" : "\\S"
          },
          "idPersonNatural" : {
            "type" : "string",
            "description" : "Mandatario natural person id",
            "pattern" : "\\S"
          },
          "idAddressBookLegal" : {
            "type" : "string",
            "description" : "Sede (address book) id for this studio; must be linked to idPersonLegal",
            "pattern" : "\\S"
          },
          "startingDate" : {
            "type" : [ "string", "null" ],
            "description" : "Optional start of membership; defaults to now (server time)."
          }
        }
      },
      "Date" : {
        "type" : "string",
        "format" : "date",
        "examples" : [ "2022-03-10" ]
      },
      "EMailMessageDTO" : {
        "type" : "object",
        "required" : [ "to", "subject", "body", "attachmentList" ],
        "properties" : {
          "to" : {
            "type" : "string"
          },
          "subject" : {
            "type" : "string"
          },
          "body" : {
            "type" : "string"
          },
          "attachmentList" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/components/schemas/AttachmentDTO"
            }
          }
        }
      },
      "FavoriteAppDTO" : {
        "type" : "object",
        "required" : [ "identificationNumber" ],
        "properties" : {
          "identificationNumber" : {
            "type" : "string"
          }
        }
      },
      "FlagState" : {
        "type" : "string",
        "enum" : [ "A", "B", "C", "ACTIVE", "INACTIVE" ]
      },
      "ForeignCity" : {
        "type" : "object",
        "properties" : {
          "migrationId" : {
            "type" : "integer",
            "format" : "int32"
          },
          "description" : {
            "type" : "string"
          },
          "migrationIdNation" : {
            "type" : "integer",
            "format" : "int32"
          },
          "startDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          },
          "endDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          },
          "nation" : {
            "$ref" : "#/components/schemas/Nation"
          }
        }
      },
      "ForeignCityDTO" : {
        "type" : "object",
        "required" : [ "description", "nation", "startDateValidity", "endDateValidity" ],
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "nation" : {
            "$ref" : "#/components/schemas/NationDTO"
          },
          "startDateValidity" : {
            "type" : "string"
          },
          "endDateValidity" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "ForeignCityNewDTO" : {
        "type" : "object",
        "required" : [ "description", "nationCode", "startDateValidity", "endDateValidity" ],
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "nationCode" : {
            "type" : "string"
          },
          "startDateValidity" : {
            "type" : [ "string", "null" ]
          },
          "endDateValidity" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "GepiLoginDTO" : {
        "type" : "object",
        "required" : [ "username", "password" ],
        "properties" : {
          "username" : {
            "type" : "string"
          },
          "password" : {
            "type" : "string"
          },
          "deviceInfo" : {
            "type" : [ "string", "null" ]
          },
          "clientIp" : {
            "type" : [ "string", "null" ]
          },
          "impersonate" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "GepiUserDto" : {
        "type" : "object",
        "required" : [ "impersonate", "user" ],
        "properties" : {
          "impersonate" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/ImpersonateUser"
            }, {
              "type" : "null"
            } ]
          },
          "user" : {
            "$ref" : "#/components/schemas/UibmUserDTO"
          }
        }
      },
      "Groups" : {
        "type" : "string",
        "enum" : [ "ADMIN", "USER", "GUEST", "UNKNOWN" ]
      },
      "ImpersonateUser" : {
        "type" : "object",
        "required" : [ "id", "username" ],
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "username" : {
            "type" : "string"
          }
        }
      },
      "IscrittiFilterDTO" : {
        "description" : "Filters for paginated Iscritti list (users with role/person dimensions).",
        "type" : "object",
        "properties" : {
          "firstName" : {
            "type" : [ "string", "null" ],
            "description" : "Substring match on person.firstName (case-insensitive)"
          },
          "surname" : {
            "type" : [ "string", "null" ],
            "description" : "Substring match on person.surname (case-insensitive)"
          },
          "fiscalCode" : {
            "type" : [ "string", "null" ],
            "description" : "Substring match on person.fiscalCode (case-insensitive)"
          },
          "agentRegistrationCode" : {
            "type" : [ "string", "null" ],
            "description" : "Substring match on roles[].agentRegistrationCode"
          },
          "lawyerRegistrationCode" : {
            "type" : [ "string", "null" ],
            "description" : "Substring match on roles[].lawyerRegistrationCode"
          },
          "flagPatent" : {
            "type" : [ "string", "null" ],
            "description" : "Substring match on roles[].flagPatent"
          },
          "flagMark" : {
            "type" : [ "string", "null" ],
            "description" : "Substring match on roles[].flagMark"
          },
          "flagState" : {
            "description" : "Exact match on roles[].flagState",
            "type" : [ "string", "null" ],
            "anyOf" : [ {
              "$ref" : "#/components/schemas/FlagState"
            }, {
              "type" : "null"
            } ]
          },
          "kindOfRoleCode" : {
            "description" : "Exact match on roles[].kindOfRole.code (MAN, MANE for foreign-mandataries Deposito screen, …)",
            "type" : [ "string", "null" ],
            "anyOf" : [ {
              "$ref" : "#/components/schemas/KindOfRoleCode"
            }, {
              "type" : "null"
            } ]
          },
          "foreignCountry" : {
            "type" : [ "string", "null" ],
            "description" : "Substring on roles[].foreignCountry (MANE / estero)"
          },
          "foreignRegistrationNumber" : {
            "type" : [ "string", "null" ],
            "description" : "Substring on roles[].foreignRegistrationNumber (codice albo estero / riferimento)"
          },
          "authorizationScope" : {
            "description" : "PATENTS | MARKS | BOTH — refines role match (Y/N style flags)",
            "type" : [ "string", "null" ],
            "anyOf" : [ {
              "$ref" : "#/components/schemas/AuthorizationScopeFilter"
            }, {
              "type" : "null"
            } ]
          }
        }
      },
      "ItalianCity" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "$ref" : "#/components/schemas/ObjectId"
          },
          "migrationId" : {
            "type" : "integer",
            "format" : "int32"
          },
          "description" : {
            "type" : "string"
          },
          "code" : {
            "type" : "string"
          },
          "cadastralCode" : {
            "type" : "string"
          },
          "startDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          },
          "endDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          },
          "province" : {
            "$ref" : "#/components/schemas/Province"
          },
          "migrationIdProvince" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "ItalianCityDTO" : {
        "type" : "object",
        "required" : [ "id", "description", "code", "cadastralCode", "startDateValidity", "endDateValidity", "province" ],
        "properties" : {
          "id" : {
            "type" : [ "string", "null" ]
          },
          "description" : {
            "type" : "string"
          },
          "code" : {
            "type" : "string"
          },
          "cadastralCode" : {
            "type" : "string"
          },
          "startDateValidity" : {
            "type" : "string"
          },
          "endDateValidity" : {
            "type" : [ "string", "null" ]
          },
          "province" : {
            "$ref" : "#/components/schemas/ProvinceDTO"
          }
        }
      },
      "KindOfAddressBookDTO" : {
        "type" : "object",
        "required" : [ "id", "description", "startDateValidity", "endDateValidity" ],
        "properties" : {
          "id" : {
            "type" : [ "string", "null" ]
          },
          "description" : {
            "type" : "string"
          },
          "startDateValidity" : {
            "type" : "string"
          },
          "endDateValidity" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "KindOfCorporationCode" : {
        "type" : "string",
        "enum" : [ "AA", "AC", "AE", "AF", "AI", "AL", "AM", "AN", "AP", "AR", "AS", "AT", "AU", "AZ", "CC", "CE", "CI", "CL", "CM", "CN", "CO", "CR", "CS", "CZ", "DI", "EC", "ED", "EE", "EI", "EM", "EN", "EP", "ER", "ES", "FI", "FO", "FS", "GE", "IC", "ID", "IF", "IR", "LL", "MA", "OC", "OO", "OS", "PA", "PC", "PS", "SA", "SC", "SD", "SE", "SF", "SI", "SL", "SM", "SN", "SO", "SP", "SR", "SRLC", "SRLS", "SS", "ST", "SU", "SV", "SZ", "ND", "ON", "VO", "CA", "EZ", "UN", "RI", "DF", "AG" ]
      },
      "KindOfCorporationDTO" : {
        "type" : "object",
        "required" : [ "description", "code", "startDateValidity", "endDateValidity", "paIndicator" ],
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "code" : {
            "$ref" : "#/components/schemas/KindOfCorporationCode"
          },
          "startDateValidity" : {
            "type" : "string"
          },
          "endDateValidity" : {
            "type" : [ "string", "null" ]
          },
          "paIndicator" : {
            "type" : "boolean"
          }
        }
      },
      "KindOfDispatch" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "$ref" : "#/components/schemas/ObjectId"
          },
          "migrationId" : {
            "type" : "integer",
            "format" : "int32"
          },
          "description" : {
            "type" : "string"
          },
          "code" : {
            "$ref" : "#/components/schemas/KindOfDispatchCode"
          },
          "startDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          },
          "endDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          }
        }
      },
      "KindOfDispatchCode" : {
        "type" : "string",
        "enum" : [ "NDI", "PEC", "EMA", "POR", "RAR" ]
      },
      "KindOfDispatchDTO" : {
        "type" : "object",
        "required" : [ "description", "startDateValidity", "endDateValidity", "code" ],
        "properties" : {
          "description" : {
            "type" : "string"
          },
          "startDateValidity" : {
            "type" : "string"
          },
          "endDateValidity" : {
            "type" : [ "string", "null" ]
          },
          "code" : {
            "$ref" : "#/components/schemas/KindOfDispatchCode"
          }
        }
      },
      "KindOfPerson" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "$ref" : "#/components/schemas/ObjectId"
          },
          "migrationId" : {
            "type" : "integer",
            "format" : "int32"
          },
          "description" : {
            "type" : "string"
          },
          "startDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          },
          "endDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          },
          "code" : {
            "$ref" : "#/components/schemas/KindOfPersonCode"
          }
        }
      },
      "KindOfPersonCode" : {
        "type" : "string",
        "enum" : [ "PF", "PG", "ND" ]
      },
      "KindOfPersonDTO" : {
        "type" : "object",
        "required" : [ "id", "description", "code", "startDateValidity", "endDateValidity" ],
        "properties" : {
          "id" : {
            "type" : [ "string", "null" ]
          },
          "description" : {
            "type" : "string"
          },
          "code" : {
            "$ref" : "#/components/schemas/KindOfPersonCode"
          },
          "startDateValidity" : {
            "type" : "string"
          },
          "endDateValidity" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "KindOfRoleCode" : {
        "type" : "string",
        "enum" : [ "DEP", "RAP", "INV", "RIC", "TIT", "MAN", "AMAN", "DEL", "COS", "CAM", "TMC", "MANE", "RAE", "RDC", "LE", "IPR", "IAC", "IDC" ]
      },
      "KindOfRoleDTO" : {
        "type" : "object",
        "required" : [ "id", "description", "code", "isEligibleForApplication", "startDateValidity", "endDateValidity" ],
        "properties" : {
          "id" : {
            "type" : [ "string", "null" ]
          },
          "description" : {
            "type" : "string"
          },
          "code" : {
            "$ref" : "#/components/schemas/KindOfRoleCode"
          },
          "isEligibleForApplication" : {
            "type" : "boolean"
          },
          "startDateValidity" : {
            "type" : "string"
          },
          "endDateValidity" : {
            "type" : [ "string", "null" ]
          },
          "eligibleForApplication" : {
            "type" : "boolean"
          }
        }
      },
      "LanguageDTO" : {
        "type" : "object",
        "required" : [ "language" ],
        "properties" : {
          "language" : {
            "type" : "string"
          }
        }
      },
      "LegalEntityAddressDTO" : {
        "type" : "object",
        "required" : [ "person", "addressBook" ],
        "properties" : {
          "person" : {
            "$ref" : "#/components/schemas/NewLegalEntityDTO"
          },
          "addressBook" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/NewAddressBookDTO"
            }, {
              "type" : "null"
            } ]
          }
        }
      },
      "LegalEntityBulk" : {
        "type" : "object",
        "required" : [ "uris", "legalEntities" ],
        "properties" : {
          "uris" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "legalEntities" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/LegalEntityDTO"
            }
          }
        }
      },
      "LegalEntityDTO" : {
        "type" : "object",
        "required" : [ "id", "kindOfCorporation", "vatNumber", "name", "pctRegistrationNumber", "reaNumber", "kindOfPerson", "kindOfDispatch", "mobilePhoneNumber", "emailAddress", "webAddress", "birthDate", "birthCity", "birthForeignCity", "nation", "startDateValidity", "endDateValidity", "addressBooks" ],
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "kindOfCorporation" : {
            "$ref" : "#/components/schemas/KindOfCorporationDTO"
          },
          "vatNumber" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "pctRegistrationNumber" : {
            "type" : "string"
          },
          "reaNumber" : {
            "type" : "string"
          },
          "kindOfPerson" : {
            "$ref" : "#/components/schemas/KindOfPersonDTO"
          },
          "kindOfDispatch" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/KindOfDispatchDTO"
            }, {
              "type" : "null"
            } ]
          },
          "mobilePhoneNumber" : {
            "type" : [ "string", "null" ]
          },
          "emailAddress" : {
            "type" : [ "string", "null" ]
          },
          "webAddress" : {
            "type" : [ "string", "null" ]
          },
          "birthDate" : {
            "type" : [ "string", "null" ]
          },
          "birthCity" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/ItalianCityDTO"
            }, {
              "type" : "null"
            } ]
          },
          "birthForeignCity" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/ForeignCityDTO"
            }, {
              "type" : "null"
            } ]
          },
          "nation" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/NationDTO"
            }, {
              "type" : "null"
            } ]
          },
          "startDateValidity" : {
            "type" : "string"
          },
          "endDateValidity" : {
            "type" : [ "string", "null" ]
          },
          "addressBooks" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/components/schemas/AddressBookDTO"
            }
          },
          "foundationDate" : {
            "type" : [ "string", "null" ]
          },
          "atecoCode" : {
            "type" : "string"
          }
        }
      },
      "LegalEntityListFilterDTO" : {
        "description" : "Optional filters for paginated legal entity list. When both are absent, all legal entities are listed (same as before filters were introduced).",
        "type" : "object",
        "properties" : {
          "name" : {
            "type" : [ "string", "null" ],
            "description" : "Case-insensitive partial match on corporate name (ragione sociale). User input is quoted for safe regex matching."
          },
          "vatNumber" : {
            "type" : [ "string", "null" ],
            "description" : "Exact match on Partita IVA (vatNumber)."
          }
        }
      },
      "LocalDate" : {
        "type" : "string",
        "format" : "date",
        "examples" : [ "2022-03-10" ]
      },
      "LocalDateTime" : {
        "type" : "string",
        "format" : "date-time",
        "examples" : [ "2022-03-10T12:15:50" ]
      },
      "LoginDTO" : {
        "type" : "object",
        "required" : [ "username", "password", "deviceInfo", "clientIp" ],
        "properties" : {
          "username" : {
            "type" : "string"
          },
          "password" : {
            "type" : "string"
          },
          "deviceInfo" : {
            "type" : [ "string", "null" ]
          },
          "clientIp" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "Methods" : {
        "type" : "string",
        "enum" : [ "GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "CONNECT", "OPTIONS", "TRACE" ]
      },
      "Nation" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "$ref" : "#/components/schemas/ObjectId"
          },
          "migrationId" : {
            "type" : "integer",
            "format" : "int32"
          },
          "name" : {
            "type" : "string"
          },
          "code" : {
            "type" : "string"
          },
          "startDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          },
          "endDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          },
          "nationOrganizationIndicator" : {
            "$ref" : "#/components/schemas/NationOrganizationIndicator"
          },
          "isEuropean" : {
            "type" : "boolean"
          },
          "upovIndicator" : {
            "type" : "boolean"
          }
        }
      },
      "NationDTO" : {
        "type" : "object",
        "required" : [ "name", "code", "startDateValidity", "endDateValidity", "nationOrganizationIndicator", "isEuropean", "upovIndicator" ],
        "properties" : {
          "name" : {
            "type" : "string"
          },
          "code" : {
            "type" : "string"
          },
          "startDateValidity" : {
            "type" : "string"
          },
          "endDateValidity" : {
            "type" : [ "string", "null" ]
          },
          "nationOrganizationIndicator" : {
            "type" : [ "string", "null" ]
          },
          "isEuropean" : {
            "type" : [ "boolean", "null" ]
          },
          "upovIndicator" : {
            "type" : [ "boolean", "null" ]
          }
        }
      },
      "NationOrganizationIndicator" : {
        "type" : "string",
        "enum" : [ "NATION", "ENTITY" ]
      },
      "NaturalPerson" : {
        "type" : "object",
        "properties" : {
          "id" : {
            "$ref" : "#/components/schemas/ObjectId"
          },
          "migrationId" : {
            "type" : "integer",
            "format" : "int32"
          },
          "migrationIdKindOfPerson" : {
            "type" : "integer",
            "format" : "int32"
          },
          "kindOfPerson" : {
            "$ref" : "#/components/schemas/KindOfPerson"
          },
          "migrationIdKindOfDispatch" : {
            "type" : "integer",
            "format" : "int32"
          },
          "kindOfDispatch" : {
            "$ref" : "#/components/schemas/KindOfDispatch"
          },
          "mobilePhoneNumber" : {
            "type" : "string"
          },
          "emailAddress" : {
            "type" : "string"
          },
          "webAddress" : {
            "type" : "string"
          },
          "migrationIdItalianCity" : {
            "type" : "integer",
            "format" : "int32"
          },
          "birthCity" : {
            "$ref" : "#/components/schemas/ItalianCity"
          },
          "migrationIdProvince" : {
            "type" : "integer",
            "format" : "int32"
          },
          "migrationIdNation" : {
            "type" : "integer",
            "format" : "int32"
          },
          "birthNation" : {
            "$ref" : "#/components/schemas/Nation"
          },
          "nationality" : {
            "$ref" : "#/components/schemas/Nation"
          },
          "startDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          },
          "endDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          },
          "migrationIdCity" : {
            "type" : "integer",
            "format" : "int32"
          },
          "fiscalCode" : {
            "type" : "string"
          },
          "firstName" : {
            "type" : "string"
          },
          "surname" : {
            "type" : "string"
          },
          "gender" : {
            "type" : "string"
          },
          "birthDate" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/LocalDate"
            }, {
              "type" : "null"
            } ]
          },
          "birthForeignCity" : {
            "$ref" : "#/components/schemas/ForeignCity"
          },
          "nation" : {
            "$ref" : "#/components/schemas/Nation"
          }
        }
      },
      "NaturalPersonAddressDTO" : {
        "type" : "object",
        "required" : [ "person", "addressBook" ],
        "properties" : {
          "person" : {
            "$ref" : "#/components/schemas/NewNaturalPersonDTO"
          },
          "addressBook" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/NewAddressBookDTO"
            }, {
              "type" : "null"
            } ]
          }
        }
      },
      "NaturalPersonDTO" : {
        "type" : "object",
        "required" : [ "id", "fiscalCode", "firstName", "surname", "gender", "kindOfPerson", "kindOfDispatch", "mobilePhoneNumber", "emailAddress", "webAddress", "birthDate", "birthCity", "birthForeignCity", "nation", "startDateValidity", "endDateValidity", "addressBooks" ],
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "fiscalCode" : {
            "type" : "string"
          },
          "firstName" : {
            "type" : "string"
          },
          "surname" : {
            "type" : "string"
          },
          "gender" : {
            "type" : "string"
          },
          "kindOfPerson" : {
            "$ref" : "#/components/schemas/KindOfPersonDTO"
          },
          "kindOfDispatch" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/KindOfDispatchDTO"
            }, {
              "type" : "null"
            } ]
          },
          "mobilePhoneNumber" : {
            "type" : [ "string", "null" ]
          },
          "emailAddress" : {
            "type" : [ "string", "null" ]
          },
          "webAddress" : {
            "type" : [ "string", "null" ]
          },
          "birthDate" : {
            "type" : [ "string", "null" ]
          },
          "birthCity" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/ItalianCityDTO"
            }, {
              "type" : "null"
            } ]
          },
          "birthForeignCity" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/ForeignCityDTO"
            }, {
              "type" : "null"
            } ]
          },
          "nation" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/NationDTO"
            }, {
              "type" : "null"
            } ]
          },
          "startDateValidity" : {
            "type" : "string"
          },
          "endDateValidity" : {
            "type" : [ "string", "null" ]
          },
          "addressBooks" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/components/schemas/AddressBookDTO"
            }
          }
        }
      },
      "NaturalPersonsBulk" : {
        "type" : "object",
        "required" : [ "uris", "naturalPersons" ],
        "properties" : {
          "uris" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "naturalPersons" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/NaturalPersonDTO"
            }
          }
        }
      },
      "NewAddressBookDTO" : {
        "type" : "object",
        "required" : [ "nationCode", "cityCadastralCode", "foreignCity", "kindOfAddressBookId", "street", "isPublicStreet", "streetNumber", "isPublicStreetNumber", "postalCode", "phoneNumber", "isPublicPhoneNumber", "faxNumber", "emailAddress", "isPublicEmailAddress", "webAddress", "idPerson", "hamlet", "careOf", "onlyMailIndicator", "correspondenceIndicator", "advanceCopies", "pecAddress", "note", "identificationNumber" ],
        "properties" : {
          "nationCode" : {
            "type" : "string"
          },
          "cityCadastralCode" : {
            "type" : "string"
          },
          "foreignCity" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/ForeignCityNewDTO"
            }, {
              "type" : "null"
            } ]
          },
          "kindOfAddressBookId" : {
            "type" : "string"
          },
          "street" : {
            "type" : "string"
          },
          "isPublicStreet" : {
            "type" : "boolean"
          },
          "streetNumber" : {
            "type" : "string"
          },
          "isPublicStreetNumber" : {
            "type" : "boolean"
          },
          "postalCode" : {
            "type" : "string"
          },
          "phoneNumber" : {
            "type" : "string"
          },
          "isPublicPhoneNumber" : {
            "type" : "boolean"
          },
          "faxNumber" : {
            "type" : [ "string", "null" ]
          },
          "emailAddress" : {
            "type" : "string"
          },
          "isPublicEmailAddress" : {
            "type" : "boolean"
          },
          "webAddress" : {
            "type" : [ "string", "null" ]
          },
          "idPerson" : {
            "type" : [ "string", "null" ]
          },
          "hamlet" : {
            "type" : [ "string", "null" ]
          },
          "careOf" : {
            "type" : "string"
          },
          "onlyMailIndicator" : {
            "type" : [ "integer", "null" ],
            "format" : "int32"
          },
          "correspondenceIndicator" : {
            "type" : [ "integer", "null" ],
            "format" : "int32"
          },
          "advanceCopies" : {
            "type" : [ "integer", "null" ],
            "format" : "int32"
          },
          "pecAddress" : {
            "type" : [ "string", "null" ]
          },
          "note" : {
            "type" : [ "string", "null" ]
          },
          "identificationNumber" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "NewLegalEntityDTO" : {
        "type" : "object",
        "required" : [ "kindOfCorporationCode", "vatNumber", "name", "pctRegistrationNumber", "reaNumber", "kindOfDispatchCode", "mobilePhoneNumber", "emailAddress", "webAddress", "birthDate", "birthCityCadastralCode", "birthForeignCity", "nationCode", "atecoCode" ],
        "properties" : {
          "kindOfCorporationCode" : {
            "$ref" : "#/components/schemas/KindOfCorporationCode"
          },
          "vatNumber" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "pctRegistrationNumber" : {
            "type" : [ "string", "null" ]
          },
          "reaNumber" : {
            "type" : [ "string", "null" ]
          },
          "kindOfDispatchCode" : {
            "$ref" : "#/components/schemas/KindOfDispatchCode"
          },
          "mobilePhoneNumber" : {
            "type" : [ "string", "null" ]
          },
          "emailAddress" : {
            "type" : [ "string", "null" ]
          },
          "webAddress" : {
            "type" : [ "string", "null" ]
          },
          "birthDate" : {
            "type" : [ "string", "null" ]
          },
          "birthCityCadastralCode" : {
            "type" : "string"
          },
          "birthForeignCity" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/ForeignCityNewDTO"
            }, {
              "type" : "null"
            } ]
          },
          "nationCode" : {
            "type" : "string"
          },
          "atecoCode" : {
            "type" : [ "string", "null" ]
          },
          "foundationDate" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "NewNaturalPersonDTO" : {
        "type" : "object",
        "required" : [ "fiscalCode", "firstName", "surname", "gender", "idKindOfDispatch", "mobilePhoneNumber", "emailAddress", "webAddress", "birthDate", "birthCityCadastralCode", "birthForeignCity", "nationCode" ],
        "properties" : {
          "fiscalCode" : {
            "type" : [ "string", "null" ]
          },
          "firstName" : {
            "type" : [ "string", "null" ]
          },
          "surname" : {
            "type" : [ "string", "null" ],
            "pattern" : "\\S"
          },
          "gender" : {
            "type" : [ "string", "null" ]
          },
          "idKindOfDispatch" : {
            "type" : [ "string", "null" ]
          },
          "mobilePhoneNumber" : {
            "type" : [ "string", "null" ]
          },
          "emailAddress" : {
            "type" : [ "string", "null" ]
          },
          "webAddress" : {
            "type" : [ "string", "null" ]
          },
          "birthDate" : {
            "type" : [ "string", "null" ]
          },
          "birthCityCadastralCode" : {
            "type" : [ "string", "null" ]
          },
          "birthForeignCity" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/ForeignCityNewDTO"
            }, {
              "type" : "null"
            } ]
          },
          "nationCode" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "NewUibmUserDTO" : {
        "type" : "object",
        "required" : [ "person", "username", "hashedPassword", "processRoles", "customSignature", "cameraleRinMarchio" ],
        "properties" : {
          "person" : {
            "$ref" : "#/components/schemas/NewNaturalPersonDTO"
          },
          "username" : {
            "type" : "string"
          },
          "hashedPassword" : {
            "type" : "string"
          },
          "roles" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/components/schemas/RoleNewDTO"
            }
          },
          "processRoles" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/components/schemas/ProcessRoleDTO"
            }
          },
          "customSignature" : {
            "type" : [ "boolean", "null" ]
          },
          "cameraleRinMarchio" : {
            "type" : [ "boolean", "null" ]
          }
        }
      },
      "NotificationDTO" : {
        "type" : "object",
        "required" : [ "id", "uibmUserId", "applicationId", "title", "message", "read", "deleted", "datetime", "priority", "typeNotification" ],
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "uibmUserId" : {
            "type" : "string"
          },
          "applicationId" : {
            "type" : [ "string", "null" ]
          },
          "title" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "read" : {
            "type" : "boolean"
          },
          "deleted" : {
            "type" : "boolean"
          },
          "datetime" : {
            "type" : "string"
          },
          "priority" : {
            "$ref" : "#/components/schemas/Priority"
          },
          "typeNotification" : {
            "$ref" : "#/components/schemas/TypeNotification"
          }
        }
      },
      "NotificationNewDTO" : {
        "type" : "object",
        "required" : [ "uibmUsername", "applicationId", "title", "message", "priority", "typeNotification" ],
        "properties" : {
          "uibmUsername" : {
            "type" : "string"
          },
          "applicationId" : {
            "type" : [ "string", "null" ]
          },
          "title" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          },
          "priority" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/Priority"
            }, {
              "type" : "null"
            } ]
          },
          "typeNotification" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/TypeNotification"
            }, {
              "type" : "null"
            } ]
          }
        }
      },
      "ObjectId" : {
        "type" : "object",
        "properties" : {
          "timestamp" : {
            "type" : "integer",
            "format" : "int32"
          },
          "nonce" : {
            "type" : "integer",
            "format" : "int64"
          },
          "date" : {
            "$ref" : "#/components/schemas/Date"
          }
        }
      },
      "OperatorDTO" : {
        "type" : "object",
        "required" : [ "firstLevelManager", "secondLevelOperator", "firstLevelManagerId" ],
        "properties" : {
          "firstLevelManager" : {
            "type" : [ "boolean", "null" ]
          },
          "secondLevelOperator" : {
            "type" : [ "boolean", "null" ]
          },
          "firstLevelManagerId" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "OperatorNewDTO" : {
        "type" : "object",
        "required" : [ "firstName", "surname", "fiscalCode", "emailAddress" ],
        "properties" : {
          "firstName" : {
            "type" : "string",
            "pattern" : "\\S"
          },
          "surname" : {
            "type" : "string",
            "pattern" : "\\S"
          },
          "fiscalCode" : {
            "type" : "string",
            "pattern" : "\\S"
          },
          "emailAddress" : {
            "type" : "string",
            "pattern" : "\\S"
          }
        }
      },
      "PaginationDTOItalianCityDTO" : {
        "type" : "object",
        "required" : [ "items", "pagination" ],
        "properties" : {
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ItalianCityDTO"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/WPagination"
          }
        }
      },
      "PaginationDTOLegalEntityDTO" : {
        "type" : "object",
        "required" : [ "items", "pagination" ],
        "properties" : {
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/LegalEntityDTO"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/WPagination"
          }
        }
      },
      "PaginationDTONaturalPersonDTO" : {
        "type" : "object",
        "required" : [ "items", "pagination" ],
        "properties" : {
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/NaturalPersonDTO"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/WPagination"
          }
        }
      },
      "PaginationDTOServiceDTO" : {
        "type" : "object",
        "required" : [ "items", "pagination" ],
        "properties" : {
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/ServiceDTO"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/WPagination"
          }
        }
      },
      "PaginationDTOUibmUserDTO" : {
        "type" : "object",
        "required" : [ "items", "pagination" ],
        "properties" : {
          "items" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/UibmUserDTO"
            }
          },
          "pagination" : {
            "$ref" : "#/components/schemas/WPagination"
          }
        }
      },
      "PasswordResetDTO" : {
        "type" : "object",
        "required" : [ "username", "email", "hashedPassword", "code" ],
        "properties" : {
          "username" : {
            "type" : "string"
          },
          "email" : {
            "type" : "string"
          },
          "hashedPassword" : {
            "type" : "string"
          },
          "code" : {
            "type" : "string"
          }
        }
      },
      "PermissionDTO" : {
        "type" : "object",
        "required" : [ "id", "service", "username", "userId", "allowed" ],
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "service" : {
            "$ref" : "#/components/schemas/ServiceDTO"
          },
          "username" : {
            "type" : "string"
          },
          "userId" : {
            "type" : "string"
          },
          "allowed" : {
            "type" : "boolean"
          }
        }
      },
      "PersonFullDTO" : {
        "type" : "object",
        "required" : [ "id", "fiscalCode", "firstName", "surname", "gender", "kindOfCorporation", "vatNumber", "vatIdNumber", "name", "pctRegistrationNumber", "reaNumber", "kindOfPerson", "kindOfDispatch", "mobilePhoneNumber", "emailAddress", "webAddress", "birthDate", "birthCity", "birthForeignCity", "nation", "startDateValidity", "endDateValidity", "atecoCode" ],
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "fiscalCode" : {
            "type" : [ "string", "null" ]
          },
          "firstName" : {
            "type" : [ "string", "null" ]
          },
          "surname" : {
            "type" : [ "string", "null" ]
          },
          "gender" : {
            "type" : [ "string", "null" ]
          },
          "kindOfCorporation" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/KindOfCorporationDTO"
            }, {
              "type" : "null"
            } ]
          },
          "vatNumber" : {
            "type" : [ "string", "null" ]
          },
          "vatIdNumber" : {
            "type" : [ "string", "null" ]
          },
          "name" : {
            "type" : [ "string", "null" ]
          },
          "pctRegistrationNumber" : {
            "type" : [ "string", "null" ]
          },
          "reaNumber" : {
            "type" : [ "string", "null" ]
          },
          "kindOfPerson" : {
            "$ref" : "#/components/schemas/KindOfPersonDTO"
          },
          "kindOfDispatch" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/KindOfDispatchDTO"
            }, {
              "type" : "null"
            } ]
          },
          "mobilePhoneNumber" : {
            "type" : [ "string", "null" ]
          },
          "emailAddress" : {
            "type" : [ "string", "null" ]
          },
          "webAddress" : {
            "type" : [ "string", "null" ]
          },
          "birthDate" : {
            "type" : [ "string", "null" ]
          },
          "birthCity" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/ItalianCityDTO"
            }, {
              "type" : "null"
            } ]
          },
          "birthForeignCity" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/ForeignCityDTO"
            }, {
              "type" : "null"
            } ]
          },
          "nation" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/NationDTO"
            }, {
              "type" : "null"
            } ]
          },
          "startDateValidity" : {
            "type" : "string"
          },
          "endDateValidity" : {
            "type" : [ "string", "null" ]
          },
          "atecoCode" : {
            "type" : [ "string", "null" ]
          },
          "foundationDate" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "PersonalAreaSearchDTO" : {
        "type" : "object",
        "required" : [ "searchType", "searchedText", "createdAt", "numberOfResults" ],
        "properties" : {
          "searchType" : {
            "type" : "string"
          },
          "searchedText" : {
            "type" : "string"
          },
          "createdAt" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/LocalDateTime"
            }, {
              "type" : "null"
            } ]
          },
          "numberOfResults" : {
            "type" : "integer",
            "format" : "int32"
          }
        }
      },
      "Priority" : {
        "type" : "string",
        "enum" : [ "LOW", "MEDIUM", "HIGH", "UNKNOWN" ]
      },
      "PrivacyIndicatorDTO" : {
        "type" : "object",
        "required" : [ "privacyIndicator" ],
        "properties" : {
          "privacyIndicator" : {
            "type" : "boolean"
          }
        }
      },
      "ProcessRoleDTO" : {
        "type" : "object",
        "required" : [ "organization", "roles" ],
        "properties" : {
          "organization" : {
            "type" : "string"
          },
          "roles" : {
            "type" : "array",
            "uniqueItems" : true,
            "items" : {
              "$ref" : "#/components/schemas/WFProcessRole"
            }
          }
        }
      },
      "Province" : {
        "type" : "object",
        "properties" : {
          "migrationId" : {
            "type" : "integer",
            "format" : "int32"
          },
          "region" : {
            "$ref" : "#/components/schemas/Region"
          },
          "migrationIdRegion" : {
            "type" : "integer",
            "format" : "int32"
          },
          "code" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          },
          "startDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          },
          "endDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          }
        }
      },
      "ProvinceDTO" : {
        "type" : "object",
        "required" : [ "code", "description", "region" ],
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          },
          "region" : {
            "$ref" : "#/components/schemas/RegionDTO"
          }
        }
      },
      "Region" : {
        "type" : "object",
        "properties" : {
          "migrationId" : {
            "type" : "integer",
            "format" : "int32"
          },
          "code" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          },
          "startDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          },
          "endDateValidity" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          }
        }
      },
      "RegionDTO" : {
        "type" : "object",
        "required" : [ "code", "description" ],
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          }
        }
      },
      "RegisterDTO" : {
        "type" : "object",
        "required" : [ "registrationStatus", "startingDate", "endingDate", "code", "patentIndicator", "trademarkIndicator", "idPerson" ],
        "properties" : {
          "registrationStatus" : {
            "$ref" : "#/components/schemas/RegistrationStatusDTO"
          },
          "startingDate" : {
            "type" : "string"
          },
          "endingDate" : {
            "type" : [ "string", "null" ]
          },
          "code" : {
            "type" : "string"
          },
          "patentIndicator" : {
            "type" : [ "integer", "null" ],
            "format" : "int32"
          },
          "trademarkIndicator" : {
            "type" : [ "integer", "null" ],
            "format" : "int32"
          },
          "idPerson" : {
            "type" : "string"
          }
        }
      },
      "RegistrationEmailDTO" : {
        "type" : "object",
        "required" : [ "emailAddress" ],
        "properties" : {
          "emailAddress" : {
            "type" : "string"
          }
        }
      },
      "RegistrationStatusDTO" : {
        "type" : "object",
        "required" : [ "migrationId", "description", "startDateValidity", "endDateValidity" ],
        "properties" : {
          "migrationId" : {
            "type" : "integer",
            "format" : "int32"
          },
          "description" : {
            "type" : "string"
          },
          "startDateValidity" : {
            "type" : "string"
          },
          "endDateValidity" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "RegistrationTokenDTO" : {
        "type" : "object",
        "required" : [ "id", "emailAddress", "createdAt", "expiresAt" ],
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "emailAddress" : {
            "type" : "string"
          },
          "createdAt" : {
            "type" : "string"
          },
          "expiresAt" : {
            "type" : "string"
          }
        }
      },
      "ResultDTO" : {
        "type" : "object",
        "required" : [ "operationResult", "message" ],
        "properties" : {
          "operationResult" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          }
        }
      },
      "RoleActivateDTO" : {
        "type" : "object",
        "required" : [ "idKindOfRole", "foreignCountry", "enclosedDocumentIdsList" ],
        "properties" : {
          "idKindOfRole" : {
            "type" : "string"
          },
          "foreignCountry" : {
            "type" : [ "string", "null" ]
          },
          "enclosedDocumentIdsList" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            },
            "minItems" : 1
          }
        }
      },
      "RoleDTO" : {
        "type" : "object",
        "required" : [ "idPerson", "kindOfRole", "createDate", "flagState", "activationDate", "foreignRepresentative", "ignoreVatCheck", "startDateValidity", "endDateValidity", "oldDettRole1", "oldDettRole2", "lawyerRegistrationCode", "agentRegistrationCode", "principalVatId", "principalName", "foreignCountry", "foreignRegistrationNumber", "flagPatent", "flagMark", "codeItaly", "oldModule", "enclosedDocumentsIds" ],
        "properties" : {
          "idPerson" : {
            "type" : "string"
          },
          "kindOfRole" : {
            "$ref" : "#/components/schemas/KindOfRoleDTO"
          },
          "createDate" : {
            "type" : "string"
          },
          "flagState" : {
            "$ref" : "#/components/schemas/FlagState"
          },
          "activationDate" : {
            "type" : [ "string", "null" ]
          },
          "foreignRepresentative" : {
            "type" : "boolean"
          },
          "ignoreVatCheck" : {
            "type" : "boolean"
          },
          "startDateValidity" : {
            "type" : [ "string", "null" ]
          },
          "endDateValidity" : {
            "type" : [ "string", "null" ]
          },
          "oldDettRole1" : {
            "type" : [ "string", "null" ]
          },
          "oldDettRole2" : {
            "type" : [ "string", "null" ]
          },
          "lawyerRegistrationCode" : {
            "type" : [ "string", "null" ]
          },
          "agentRegistrationCode" : {
            "type" : [ "string", "null" ]
          },
          "principalVatId" : {
            "type" : [ "string", "null" ]
          },
          "principalName" : {
            "type" : [ "string", "null" ]
          },
          "foreignCountry" : {
            "type" : [ "string", "null" ]
          },
          "foreignRegistrationNumber" : {
            "type" : [ "string", "null" ]
          },
          "flagPatent" : {
            "type" : [ "string", "null" ]
          },
          "flagMark" : {
            "type" : [ "string", "null" ]
          },
          "codeItaly" : {
            "type" : [ "string", "null" ]
          },
          "oldModule" : {
            "type" : [ "string", "null" ]
          },
          "enclosedDocumentsIds" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "string"
            }
          }
        }
      },
      "RoleNewDTO" : {
        "type" : "object",
        "required" : [ "code", "flagState" ],
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "flagState" : {
            "type" : "string"
          }
        }
      },
      "RolePatchRequestDTO" : {
        "description" : "Admin patch for an existing embedded role (e.g. MANE). Matches the role by `idKindOfRole` and optionally `foreignCountry` when the user has several roles of the same kind. At least one of `codeItaly`, `foreignRegistrationNumber`, `agentRegistrationCode`, or `codeNation` must be set.",
        "type" : "object",
        "required" : [ "idKindOfRole" ],
        "properties" : {
          "idKindOfRole" : {
            "type" : "string"
          },
          "foreignCountry" : {
            "type" : [ "string", "null" ],
            "description" : "Optional disambiguator: must equal `roles[].foreignCountry` on the role to update (typically the nation label stored at creation, e.g. country name)."
          },
          "codeItaly" : {
            "type" : [ "string", "null" ],
            "description" : "For MANE: Italian register inscription code (`roles[].codeItaly`). Ignored for other role kinds."
          },
          "foreignRegistrationNumber" : {
            "type" : [ "string", "null" ],
            "description" : "Foreign register reference (`roles[].foreignRegistrationNumber`)."
          },
          "agentRegistrationCode" : {
            "type" : [ "string", "null" ],
            "description" : "Foreign register / albo code on the role (`roles[].agentRegistrationCode`). For MANE this is the main foreign albo code shown on Modulo Ruolo."
          },
          "codeNation" : {
            "type" : [ "string", "null" ],
            "description" : "When set, updates `roles[].foreignCountry` to the nation’s display name (same as new-role flow)."
          },
          "nonBlankPatchPresent" : {
            "type" : "boolean"
          }
        }
      },
      "RoleRequestDTO" : {
        "description" : "Adds a **new** role application via PATCH /api/users/{username}/role. For **MAN** (mandatario italiano): `agentRegistrationCode` is the codice albo mandatari. For **MANE** (mandatario estero): `agentRegistrationCode` is the main foreign register code; `codeItaly` is the Italian albo inscription code when known; `codeNation` is the foreign country; optional `foreignRegistrationNumber` for an extra foreign reference. To change fields on an existing role, use PATCH /api/users/{username}/role/patch (admin).",
        "type" : "object",
        "required" : [ "idKindOfRole", "codeNation", "lawyerRegistrationCode", "agentRegistrationCode", "principalVatId", "principalName" ],
        "properties" : {
          "idKindOfRole" : {
            "type" : "string"
          },
          "codeNation" : {
            "type" : [ "string", "null" ]
          },
          "lawyerRegistrationCode" : {
            "type" : [ "string", "null" ]
          },
          "agentRegistrationCode" : {
            "type" : [ "string", "null" ]
          },
          "principalVatId" : {
            "type" : [ "string", "null" ]
          },
          "principalName" : {
            "type" : [ "string", "null" ]
          },
          "flagPatent" : {
            "type" : [ "string", "null" ],
            "description" : "Authorization scope for patents on this role (e.g. A/S/N); stored on roles[].flagPatent when requesting MAN/MANE."
          },
          "flagMark" : {
            "type" : [ "string", "null" ],
            "description" : "Authorization scope for trade marks on this role (e.g. A/S/N); stored on roles[].flagMark when requesting MAN/MANE."
          },
          "codeItaly" : {
            "type" : [ "string", "null" ],
            "description" : "Italian register inscription code (`roles[].codeItaly`). Meaningful for MANE; ignored for MAN (use agentRegistrationCode)."
          },
          "foreignRegistrationNumber" : {
            "type" : [ "string", "null" ],
            "description" : "Optional extra foreign register reference (`roles[].foreignRegistrationNumber`). For MANE, primary foreign code is usually `agentRegistrationCode`."
          }
        }
      },
      "ServiceDTO" : {
        "type" : "object",
        "required" : [ "codebase", "method", "serviceName", "description" ],
        "properties" : {
          "codebase" : {
            "$ref" : "#/components/schemas/Codebases"
          },
          "method" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/Methods"
            }, {
              "type" : "null"
            } ]
          },
          "serviceName" : {
            "type" : "string"
          },
          "description" : {
            "type" : "string"
          }
        }
      },
      "StatisticalQueryDto" : {
        "type" : "object",
        "properties" : {
          "scope" : {
            "type" : "string"
          },
          "scopeFunction" : {
            "type" : "string"
          },
          "chartType" : {
            "type" : "string"
          },
          "tab" : {
            "type" : "string"
          },
          "title" : {
            "type" : "string"
          },
          "creationDate" : {
            "$ref" : "#/components/schemas/LocalDateTime"
          },
          "isDefault" : {
            "type" : "boolean"
          },
          "identifier" : {
            "type" : [ "string", "null" ]
          },
          "applicationGroup" : {
            "type" : [ "string", "null" ]
          },
          "kindsApplication" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "string"
            }
          },
          "dateFrom" : {
            "type" : [ "string", "null" ]
          },
          "dateTo" : {
            "type" : [ "string", "null" ]
          },
          "yearFrom" : {
            "type" : [ "string", "null" ]
          },
          "yearTo" : {
            "type" : [ "string", "null" ]
          },
          "months" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "string"
            }
          },
          "regions" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "string"
            }
          },
          "countries" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "string"
            }
          },
          "provinces" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "string"
            }
          },
          "role" : {
            "type" : [ "string", "null" ]
          },
          "applicantType" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "string"
            }
          },
          "legalPersonType" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "string"
            }
          },
          "kindOfMarkWipoCode" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "string"
            }
          },
          "kindOfMarkCode" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "string"
            }
          },
          "kindOfRegistrationCode" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "string"
            }
          },
          "classifications" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/components/schemas/ClassificationDto"
            }
          },
          "secondaryClassifications" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/components/schemas/ClassificationDto"
            }
          },
          "applicationStatus" : {
            "type" : [ "array", "null" ],
            "items" : {
              "type" : "string"
            }
          },
          "top10" : {
            "type" : [ "boolean", "null" ]
          },
          "default" : {
            "type" : "boolean"
          }
        }
      },
      "StudiesGroupAgentMembershipDTO" : {
        "description" : "One mandatario (natural person) linked to a studio (legal entity) and sede (address). Each row corresponds to a studies-groups document; endingDate set means the membership is inactive.",
        "type" : "object",
        "required" : [ "idStudiesGroup", "naturalPerson", "startingDate", "endingDate" ],
        "properties" : {
          "idStudiesGroup" : {
            "type" : "string",
            "description" : "Identifier of the studies-groups document for this mandatario–sede link."
          },
          "naturalPerson" : {
            "$ref" : "#/components/schemas/NaturalPersonDTO"
          },
          "startingDate" : {
            "type" : "string",
            "description" : "When the mandatario membership at this sede became valid."
          },
          "endingDate" : {
            "type" : [ "string", "null" ],
            "description" : "When the membership ended; null means still active (attivo) for Deposito purposes."
          }
        }
      },
      "StudiesGroupDTO" : {
        "type" : "object",
        "required" : [ "idStudiesGroup", "legalEntity", "addressBook", "startingDate", "endingDate" ],
        "properties" : {
          "idStudiesGroup" : {
            "type" : "string"
          },
          "legalEntity" : {
            "$ref" : "#/components/schemas/LegalEntityDTO"
          },
          "addressBook" : {
            "$ref" : "#/components/schemas/AddressBookDTO"
          },
          "startingDate" : {
            "type" : "string",
            "description" : "Start of validity for this studies-group row (mandatario at this sede)."
          },
          "endingDate" : {
            "type" : [ "string", "null" ],
            "description" : "End of validity; null means the row is still active."
          }
        }
      },
      "StudiesGroupWithAgentsDTO" : {
        "type" : "object",
        "required" : [ "idStudiesGroup", "legalEntity", "addressBook", "agents", "agentMemberships" ],
        "properties" : {
          "idStudiesGroup" : {
            "type" : "string",
            "description" : "One representative studies-groups id for this legal entity + sede pair (same value for all agents at that sede)."
          },
          "legalEntity" : {
            "$ref" : "#/components/schemas/LegalEntityDTO"
          },
          "addressBook" : {
            "$ref" : "#/components/schemas/AddressBookDTO"
          },
          "agents" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/NaturalPersonDTO"
            },
            "description" : "Mandatari as natural persons only; prefer agentMemberships for start/end (attivo) per person."
          },
          "agentMemberships" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/StudiesGroupAgentMembershipDTO"
            },
            "description" : "Mandatari with membership metadata (startingDate / endingDate) for this sede."
          }
        }
      },
      "SubjectDTO" : {
        "type" : "object",
        "required" : [ "subject", "fiscalCode", "clientIp", "deviceInfo" ],
        "properties" : {
          "subject" : {
            "type" : "string"
          },
          "fiscalCode" : {
            "type" : [ "string", "null" ]
          },
          "clientIp" : {
            "type" : [ "string", "null" ]
          },
          "deviceInfo" : {
            "type" : [ "string", "null" ]
          }
        }
      },
      "TypeNotification" : {
        "type" : "string",
        "enum" : [ "NOTIFY", "MESSAGE" ]
      },
      "UibmUserDTO" : {
        "type" : "object",
        "required" : [ "id", "person", "username", "hashedPassword", "jwtToken", "group", "email", "language", "privacyIndicator", "subject", "favoriteApplications", "roles", "operator", "processRoles", "lastLogin", "deviceInfo", "clientIp", "autoSignActionList", "autoVerifyActionList", "customSignature", "cameraleRinMarchio" ],
        "properties" : {
          "id" : {
            "type" : [ "string", "null" ]
          },
          "person" : {
            "$ref" : "#/components/schemas/NaturalPersonDTO"
          },
          "username" : {
            "type" : "string"
          },
          "hashedPassword" : {
            "type" : "string"
          },
          "jwtToken" : {
            "type" : "string"
          },
          "group" : {
            "type" : "string"
          },
          "email" : {
            "type" : "string"
          },
          "language" : {
            "type" : "string"
          },
          "privacyIndicator" : {
            "type" : "boolean"
          },
          "subject" : {
            "type" : [ "string", "null" ]
          },
          "favoriteApplications" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "roles" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/RoleDTO"
            }
          },
          "unreadNotifications" : {
            "type" : "integer",
            "format" : "int32"
          },
          "operator" : {
            "anyOf" : [ {
              "$ref" : "#/components/schemas/OperatorDTO"
            }, {
              "type" : "null"
            } ]
          },
          "processRoles" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/components/schemas/ProcessRoleDTO"
            }
          },
          "lastLogin" : {
            "type" : [ "string", "null" ]
          },
          "deviceInfo" : {
            "type" : [ "string", "null" ]
          },
          "clientIp" : {
            "type" : [ "string", "null" ]
          },
          "autoSignActionList" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/components/schemas/ActionDTO"
            }
          },
          "autoVerifyActionList" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/components/schemas/ActionDTO"
            }
          },
          "customSignature" : {
            "type" : [ "boolean", "null" ]
          },
          "cameraleRinMarchio" : {
            "type" : [ "boolean", "null" ]
          }
        }
      },
      "UibmUserNewDTO" : {
        "type" : "object",
        "required" : [ "idPerson", "username", "hashedPassword" ],
        "properties" : {
          "idPerson" : {
            "type" : "string",
            "minLength" : 1
          },
          "username" : {
            "type" : "string",
            "minLength" : 1
          },
          "hashedPassword" : {
            "type" : "string",
            "minLength" : 1
          }
        }
      },
      "UpdateAutoOperationDTO" : {
        "type" : "object",
        "required" : [ "actionDto", "operation" ],
        "properties" : {
          "actionDto" : {
            "$ref" : "#/components/schemas/ActionDTO"
          },
          "operation" : {
            "$ref" : "#/components/schemas/Action"
          }
        }
      },
      "UpdateEmailInfoDTO" : {
        "type" : "object",
        "required" : [ "emailAddress" ],
        "properties" : {
          "emailAddress" : {
            "type" : "string"
          }
        }
      },
      "UpdateFavoriteApplicationsDTO" : {
        "type" : "object",
        "required" : [ "identificationNumber", "action" ],
        "properties" : {
          "identificationNumber" : {
            "type" : "string"
          },
          "action" : {
            "$ref" : "#/components/schemas/Action"
          }
        }
      },
      "UserPermissionsDTO" : {
        "type" : "object",
        "required" : [ "userId", "personId", "username", "groups", "roles", "processRoles", "permissions" ],
        "properties" : {
          "userId" : {
            "type" : "string"
          },
          "personId" : {
            "type" : "string"
          },
          "username" : {
            "type" : "string"
          },
          "groups" : {
            "$ref" : "#/components/schemas/Groups"
          },
          "roles" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/components/schemas/RoleDTO"
            }
          },
          "processRoles" : {
            "type" : [ "array", "null" ],
            "items" : {
              "$ref" : "#/components/schemas/ProcessRoleDTO"
            }
          },
          "permissions" : {
            "type" : "array",
            "items" : {
              "$ref" : "#/components/schemas/PermissionDTO"
            }
          }
        }
      },
      "WFProcessRole" : {
        "type" : "string",
        "enum" : [ "DEPOSITANTE", "ASSEGNATORE", "ASSEGNATORE_AMMINISTRATIVO", "DELEGATO_AMMINISTRATIVO", "DIRIGENTE_AMMINISTRATIVO", "RICHIEDENTE", "DIRIGENTE", "ESAMINATORE", "FIRMATARIO", "DELEGATO", "COMMISSIONE", "CAPOSERVIZIO", "PRESIDENTE", "ESAMINATORE_AMMINISTRATIVO", "ESAMINATORE_ESTERNO", "SEGRETERIA", "DASHBOARD", "TRADUTTORE", "ARCHIVIATORE", "CALL_CENTER", "TASSE", "TITOLARE", "PORTATORE_INTERESSE", "RELATORE" ]
      },
      "WPagination" : {
        "type" : "object",
        "required" : [ "totalSize", "index", "size", "numberOfPages", "nextPageIndex", "prevPageIndex", "hasNextPage", "hasPrevPage" ],
        "properties" : {
          "totalSize" : {
            "type" : "integer",
            "format" : "int64"
          },
          "index" : {
            "type" : "integer",
            "format" : "int32"
          },
          "size" : {
            "type" : "integer",
            "format" : "int32"
          },
          "numberOfPages" : {
            "type" : "integer",
            "format" : "int32"
          },
          "nextPageIndex" : {
            "type" : "integer",
            "format" : "int32"
          },
          "prevPageIndex" : {
            "type" : "integer",
            "format" : "int32"
          },
          "hasNextPage" : {
            "type" : "boolean"
          },
          "hasPrevPage" : {
            "type" : "boolean"
          }
        }
      }
    },
    "securitySchemes" : {
      "BearerAuth" : {
        "type" : "http",
        "scheme" : "bearer",
        "bearerFormat" : "JWT"
      },
      "SecurityScheme" : {
        "type" : "openIdConnect",
        "openIdConnectUrl" : "https://sso.mise.gov.it:443/ssoservice/oauth2/realms/root/realms/public/.well-known/openid-configuration",
        "description" : "Authentication"
      }
    }
  },
  "tags" : [ {
    "name" : "Alive Controller",
    "description" : "Health related APIs"
  }, {
    "name" : "Geography",
    "description" : "Places, nations, addresses, studies-groups. Soft-close uses endingDate; DELETE address removes the row."
  }, {
    "name" : "Message Controller",
    "description" : "Message related APIs"
  }, {
    "name" : "Notifications Controller",
    "description" : "Notification related APIs"
  }, {
    "name" : "OIDC Controller",
    "description" : "OIDC related APIs"
  }, {
    "name" : "Permission Controller",
    "description" : "UIBM permissions APIs"
  }, {
    "name" : "Persons",
    "description" : "Natural and legal persons. Legal entities here omit address books; load sedi via GET /api/geo/address/person/{idPersonLegal}."
  }, {
    "name" : "Register Controller",
    "description" : "Registers related APIs"
  }, {
    "name" : "Service Controller",
    "description" : "UIBM APIs"
  }, {
    "name" : "Users",
    "description" : "UIBM accounts, roles, enrollees."
  } ],
  "paths" : {
    "/api/alive" : {
      "get" : {
        "tags" : [ "Alive Controller" ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AliveDTO"
                }
              }
            }
          }
        },
        "summary" : "Alive"
      }
    },
    "/api/bookmarks/{userId}" : {
      "get" : {
        "summary" : "Get all bookmarks by userid",
        "parameters" : [ {
          "name" : "userId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BookmarkDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "tags" : [ "Bookmark Controller" ],
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/bookmarks/{userId}/favorites" : {
      "delete" : {
        "summary" : "remove favorite application from user bookmark",
        "parameters" : [ {
          "name" : "userId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/FavoriteAppDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BookmarkDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "tags" : [ "Bookmark Controller" ],
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      },
      "post" : {
        "summary" : "add favorite application to user bookmark",
        "parameters" : [ {
          "name" : "userId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/FavoriteAppDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BookmarkDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "tags" : [ "Bookmark Controller" ],
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/bookmarks/{userId}/searches" : {
      "delete" : {
        "summary" : "remove personal area search from user bookmark",
        "parameters" : [ {
          "name" : "userId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PersonalAreaSearchDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BookmarkDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "tags" : [ "Bookmark Controller" ],
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      },
      "post" : {
        "summary" : "add personal area search to user bookmark",
        "parameters" : [ {
          "name" : "userId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PersonalAreaSearchDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BookmarkDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "tags" : [ "Bookmark Controller" ],
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/bookmarks/{userId}/trend-query" : {
      "put" : {
        "summary" : "update trend query bookmark",
        "parameters" : [ {
          "name" : "userId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/StatisticalQueryDto"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BookmarkDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "tags" : [ "Bookmark Controller" ],
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      },
      "post" : {
        "summary" : "add trend query bookmark",
        "parameters" : [ {
          "name" : "userId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/StatisticalQueryDto"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BookmarkDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "tags" : [ "Bookmark Controller" ],
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/bookmarks/{userId}/trend-query/{identifier}" : {
      "delete" : {
        "summary" : "remove trend query bookmark",
        "parameters" : [ {
          "name" : "identifier",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "userId",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/BookmarkDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "tags" : [ "Bookmark Controller" ],
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/callback" : {
      "get" : {
        "tags" : [ "OIDC Controller" ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "text/plain" : {
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "summary" : "Oidc Callback",
        "security" : [ {
          "BearerAuth" : [ ]
        } ]
      }
    },
    "/api/geo/address" : {
      "get" : {
        "summary" : "Get all address books",
        "tags" : [ "Geography" ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/AddressBookDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      },
      "post" : {
        "summary" : "Add a new address book",
        "tags" : [ "Geography" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/NewAddressBookDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AddressBookDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/address/bulk" : {
      "put" : {
        "summary" : "Bulk update of a list of address books",
        "tags" : [ "Geography" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "$ref" : "#/components/schemas/AddressBookBulkUpdateDTO"
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/AddressBookDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/address/id-kind-of-address-book/{idKindOfAddressBook}/id-person/{idPerson}" : {
      "get" : {
        "summary" : "Get address books by id kind of address book and id person",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "idKindOfAddressBook",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "idPerson",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/AddressBookDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/address/id/{id}" : {
      "get" : {
        "summary" : "Get address book by given id",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AddressBookDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/address/ids" : {
      "get" : {
        "summary" : "Get address books list by given id",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "query",
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/AddressBookDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/address/person/{idPerson}" : {
      "get" : {
        "summary" : "Address books by idPerson",
        "description" : "For a studio, pass legal entity id (AddressBook.idPerson). Filter kinds client-side or use /address/id-kind-of-address-book/...",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "idPerson",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/AddressBookDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/address/{id}" : {
      "put" : {
        "summary" : "Update an address book",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/NewAddressBookDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/AddressBookDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      },
      "delete" : {
        "summary" : "Delete address book (hard)",
        "description" : "KO if delete fails (e.g. still referenced).",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ResultDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/city" : {
      "get" : {
        "summary" : "Get all cities with default pagination",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "valid",
          "in" : "query",
          "schema" : {
            "type" : "boolean",
            "default" : true
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginationDTOItalianCityDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      },
      "post" : {
        "summary" : "Add a new city",
        "tags" : [ "Geography" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ItalianCityDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItalianCityDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/geo/city/index/{index}/size/{size}" : {
      "get" : {
        "summary" : "Get all cities with pagination",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "index",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "size",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "valid",
          "in" : "query",
          "schema" : {
            "type" : "boolean",
            "default" : true
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginationDTOItalianCityDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/city/{id}" : {
      "put" : {
        "summary" : "Update a city",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ItalianCityDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ItalianCityDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      },
      "delete" : {
        "summary" : "Delete a city",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ResultDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/geo/nation" : {
      "get" : {
        "summary" : "Get all nations",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "valid",
          "in" : "query",
          "schema" : {
            "type" : "boolean",
            "default" : true
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/NationDTO"
                  }
                }
              }
            }
          }
        }
      },
      "post" : {
        "summary" : "Add a new nation",
        "tags" : [ "Geography" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/NationDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/NationDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/geo/nation/{code}" : {
      "put" : {
        "summary" : "Update a nation",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "code",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/NationDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/NationDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      },
      "get" : {
        "summary" : "Get nation by code",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "code",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/NationDTO"
                }
              }
            }
          }
        }
      },
      "delete" : {
        "summary" : "Delete a nation",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "code",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ResultDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/geo/persons/{idPerson}/studies-groups" : {
      "get" : {
        "summary" : "Studies groups for mandatario",
        "description" : "idPerson is natural person. Studios: use …/by-legal-entity/{id}. onlyActive trims by endingDate.",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "idPerson",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "onlyActive",
          "in" : "query",
          "schema" : {
            "type" : "boolean",
            "default" : false
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/StudiesGroupWithAgentsDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/province" : {
      "get" : {
        "summary" : "Get all distinct provinces",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "valid",
          "in" : "query",
          "schema" : {
            "type" : "boolean",
            "default" : true
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/ProvinceDTO"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/geo/province/region/{code}" : {
      "get" : {
        "summary" : "Get all provinces in a region by code",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "code",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "valid",
          "in" : "query",
          "schema" : {
            "type" : "boolean",
            "default" : true
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/ProvinceDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/province/{code}" : {
      "get" : {
        "summary" : "Get all cities in a province by code",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "code",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "valid",
          "in" : "query",
          "schema" : {
            "type" : "boolean",
            "default" : true
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/ItalianCityDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/region" : {
      "get" : {
        "summary" : "Get all distinct regions",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "valid",
          "in" : "query",
          "schema" : {
            "type" : "boolean",
            "default" : true
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/RegionDTO"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/geo/studies-groups" : {
      "post" : {
        "summary" : "Create or reopen studies-group",
        "description" : "Idempotent on legal entity + mandatario + address book; 201 only on insert.",
        "tags" : [ "Geography" ],
        "requestBody" : {
          "description" : "Legal entity, mandatario, sede.",
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CreateStudiesGroupRequestDTO"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "Already existed or reopened.",
            "content" : {
              "application/json" : {
                "schema" : { }
              }
            }
          },
          "201" : {
            "description" : "Created."
          },
          "400" : {
            "description" : "Bad ids/date or sede not for entity."
          },
          "404" : {
            "description" : "Not found."
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/studies-groups/by-person-legal/{idPersonLegal}" : {
      "get" : {
        "summary" : "Legal entity: sedi and mandatari",
        "description" : "One item per sede; membership active when endingDate is null.",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "idPersonLegal",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/StudiesGroupWithAgentsDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/studies-groups/sede/close" : {
      "patch" : {
        "summary" : "Close sede at studio (all memberships)",
        "description" : "Sets endingDate on all rows for legal entity + address.",
        "tags" : [ "Geography" ],
        "requestBody" : {
          "description" : "Legal entity and address book ids for this sede.",
          "required" : true,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CloseSedeRequestDTO"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/StudiesGroupWithAgentsDTO"
                }
              }
            }
          },
          "404" : {
            "description" : "No row for entity + address."
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/studies-groups/{idStudiesGroup}" : {
      "get" : {
        "summary" : "Studies group by id",
        "description" : "No agent list — use …/with-agents.",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "idStudiesGroup",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/StudiesGroupDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/studies-groups/{idStudiesGroup}/close" : {
      "patch" : {
        "summary" : "Close one studies-group membership",
        "description" : "Optional idPersonNatural in body -> 409 if mismatch.",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "idStudiesGroup",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "description" : "Optional idPersonNatural.",
          "required" : false,
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/CloseMembershipRequestDTO"
              }
            }
          }
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : { }
              }
            }
          },
          "404" : { },
          "409" : {
            "description" : "idPersonNatural mismatch."
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/studies-groups/{idStudiesGroup}/reopen" : {
      "patch" : {
        "summary" : "Reopen membership",
        "description" : "Clears endingDate; idempotent.",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "idStudiesGroup",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/StudiesGroupWithAgentsDTO"
                }
              }
            }
          },
          "404" : { },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/geo/studies-groups/{idStudiesGroup}/with-agents" : {
      "get" : {
        "summary" : "Studies group with agents",
        "description" : "Adds agentMemberships vs GET …/studies-groups/{id}.",
        "tags" : [ "Geography" ],
        "parameters" : [ {
          "name" : "idStudiesGroup",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/StudiesGroupWithAgentsDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/kinds/address" : {
      "get" : {
        "summary" : "Get all kinds of address book",
        "parameters" : [ {
          "name" : "valid",
          "in" : "query",
          "schema" : {
            "type" : "boolean",
            "default" : true
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/KindOfAddressBookDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      },
      "post" : {
        "summary" : "Add a new kind of address book",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/KindOfAddressBookDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/KindOfAddressBookDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/kinds/address/{id}" : {
      "put" : {
        "summary" : "Update a kind of address book",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/KindOfAddressBookDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/KindOfAddressBookDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      },
      "delete" : {
        "summary" : "Delete a kind of address book",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ResultDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/kinds/corporation" : {
      "get" : {
        "summary" : "Get all kinds of corporation",
        "parameters" : [ {
          "name" : "valid",
          "in" : "query",
          "schema" : {
            "type" : "boolean",
            "default" : true
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/KindOfCorporationDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      },
      "post" : {
        "summary" : "Add a new kind of corporation",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/KindOfCorporationDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/KindOfCorporationDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/kinds/corporation/{code}" : {
      "put" : {
        "summary" : "Update a kind of corporation",
        "parameters" : [ {
          "name" : "code",
          "in" : "path",
          "required" : true,
          "schema" : {
            "$ref" : "#/components/schemas/KindOfCorporationCode"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/KindOfCorporationDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/KindOfCorporationDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      },
      "delete" : {
        "summary" : "Delete a kind of corporation",
        "parameters" : [ {
          "name" : "code",
          "in" : "path",
          "required" : true,
          "schema" : {
            "$ref" : "#/components/schemas/KindOfCorporationCode"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ResultDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/kinds/dispatch" : {
      "get" : {
        "summary" : "Get all kinds of dispatch",
        "parameters" : [ {
          "name" : "valid",
          "in" : "query",
          "schema" : {
            "type" : "boolean",
            "default" : true
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/KindOfDispatchDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      },
      "post" : {
        "summary" : "Add a new kind of dispatch",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/KindOfDispatchDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/KindOfDispatchDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/kinds/dispatch/{code}" : {
      "put" : {
        "summary" : "Update a kind of dispatch",
        "parameters" : [ {
          "name" : "code",
          "in" : "path",
          "required" : true,
          "schema" : {
            "$ref" : "#/components/schemas/KindOfDispatchCode"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/KindOfDispatchDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/KindOfDispatchDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      },
      "delete" : {
        "summary" : "Delete a kind of dispatch",
        "parameters" : [ {
          "name" : "code",
          "in" : "path",
          "required" : true,
          "schema" : {
            "$ref" : "#/components/schemas/KindOfDispatchCode"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ResultDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/kinds/person" : {
      "get" : {
        "summary" : "Get all kinds of person",
        "parameters" : [ {
          "name" : "valid",
          "in" : "query",
          "schema" : {
            "type" : "boolean",
            "default" : true
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/KindOfPersonDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      },
      "post" : {
        "summary" : "Add a new kind of person",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/KindOfPersonDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/KindOfPersonDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/kinds/person/{id}" : {
      "put" : {
        "summary" : "Update a kind of person",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/KindOfPersonDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/KindOfPersonDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      },
      "delete" : {
        "summary" : "Delete a kind of person",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ResultDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/kinds/role" : {
      "get" : {
        "summary" : "Get all kinds of role",
        "parameters" : [ {
          "name" : "valid",
          "in" : "query",
          "schema" : {
            "type" : "boolean",
            "default" : true
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/KindOfRoleDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      },
      "post" : {
        "summary" : "Add a new kind of role",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/KindOfRoleDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/KindOfRoleDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/kinds/role/{id}" : {
      "put" : {
        "summary" : "Update a kind of role",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/KindOfRoleDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/KindOfRoleDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      },
      "delete" : {
        "summary" : "Delete a kind of role",
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ResultDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "tags" : [ "Kinds Controller" ],
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/messages/email" : {
      "post" : {
        "summary" : "Send email message",
        "tags" : [ "Message Controller" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/EMailMessageDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "description" : "Created"
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/notifications" : {
      "get" : {
        "summary" : "Get all notifications",
        "tags" : [ "Notifications Controller" ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/NotificationDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      },
      "post" : {
        "summary" : "Create a new notification",
        "tags" : [ "Notifications Controller" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/NotificationNewDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "text/plain" : {
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/notifications/stream" : {
      "get" : {
        "summary" : "Stream notifications in real-time via SSE",
        "tags" : [ "Notifications Controller" ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "text/event-stream" : {
                "schema" : {
                  "$ref" : "#/components/schemas/NotificationDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/notifications/user/{username}" : {
      "get" : {
        "summary" : "Get all notifications for the user",
        "tags" : [ "Notifications Controller" ],
        "parameters" : [ {
          "name" : "username",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/NotificationDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/notifications/user/{username}/read" : {
      "put" : {
        "summary" : "Set all notifications as read for the user",
        "tags" : [ "Notifications Controller" ],
        "parameters" : [ {
          "name" : "username",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "No Content"
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/notifications/{id}" : {
      "get" : {
        "summary" : "Get a notification by id",
        "tags" : [ "Notifications Controller" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/NotificationDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      },
      "delete" : {
        "summary" : "Delete a notification",
        "tags" : [ "Notifications Controller" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "No Content"
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/notifications/{id}/delete" : {
      "put" : {
        "summary" : "Set a notification as deleted",
        "tags" : [ "Notifications Controller" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "No Content"
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/notifications/{id}/read/{read}" : {
      "get" : {
        "summary" : "Update a notification read status",
        "tags" : [ "Notifications Controller" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "read",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "boolean"
          }
        } ],
        "responses" : {
          "204" : {
            "description" : "No Content"
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/permissions" : {
      "get" : {
        "summary" : "Get user permissions",
        "tags" : [ "Permission Controller" ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/UserPermissionsDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/legal-entity" : {
      "get" : {
        "summary" : "Paged legal entities",
        "description" : "Optional query: name, vatNumber.",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "name",
          "in" : "query",
          "schema" : {
            "description" : "Case-insensitive partial match on corporate name (ragione sociale). User input is quoted for safe regex matching.",
            "type" : [ "string", "null" ]
          }
        }, {
          "name" : "vatNumber",
          "in" : "query",
          "schema" : {
            "description" : "Exact match on Partita IVA (vatNumber).",
            "type" : [ "string", "null" ]
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginationDTOLegalEntityDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      },
      "post" : {
        "summary" : "Add a new legal entity",
        "tags" : [ "Persons" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/NewLegalEntityDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/LegalEntityDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/legal-entity/address-book/bulk" : {
      "post" : {
        "summary" : "Add legal entity with address book",
        "tags" : [ "Persons" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "$ref" : "#/components/schemas/LegalEntityAddressDTO"
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/LegalEntityBulk"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/legal-entity/all" : {
      "get" : {
        "summary" : "Get all legal entities without pagination. It's used by CommonAPI for DB initialization",
        "tags" : [ "Persons" ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/LegalEntityDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/legal-entity/bulk" : {
      "post" : {
        "summary" : "Create a list of legal entities",
        "tags" : [ "Persons" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "$ref" : "#/components/schemas/NewLegalEntityDTO"
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/LegalEntityDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/legal-entity/ids" : {
      "get" : {
        "summary" : "Get legal entities by ids",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "query",
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/LegalEntityDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/legal-entity/index/{index}/size/{size}" : {
      "get" : {
        "summary" : "Paged legal entities (explicit page)",
        "description" : "Optional query: name, vatNumber.",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "index",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "size",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "name",
          "in" : "query",
          "schema" : {
            "description" : "Case-insensitive partial match on corporate name (ragione sociale). User input is quoted for safe regex matching.",
            "type" : [ "string", "null" ]
          }
        }, {
          "name" : "vatNumber",
          "in" : "query",
          "schema" : {
            "description" : "Exact match on Partita IVA (vatNumber).",
            "type" : [ "string", "null" ]
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginationDTOLegalEntityDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/legal-entity/vatnumber/{vatNumber}" : {
      "get" : {
        "summary" : "Get latest valid legal entity by vatNumber",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "vatNumber",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/LegalEntityDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/legal-entity/{id}" : {
      "put" : {
        "summary" : "Update a legal entity",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/NewLegalEntityDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/LegalEntityDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      },
      "get" : {
        "summary" : "Get legal entity by id",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/LegalEntityDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/natural-person" : {
      "post" : {
        "summary" : "Create a natural person",
        "tags" : [ "Persons" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/NewNaturalPersonDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/NaturalPersonDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      },
      "get" : {
        "summary" : "Get all natural persons with default pagination",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "city",
          "in" : "query",
          "schema" : {
            "type" : [ "string", "null" ]
          }
        }, {
          "name" : "emailAddress",
          "in" : "query",
          "schema" : {
            "type" : [ "string", "null" ]
          }
        }, {
          "name" : "firstName",
          "in" : "query",
          "schema" : {
            "type" : [ "string", "null" ]
          }
        }, {
          "name" : "fiscalCode",
          "in" : "query",
          "schema" : {
            "type" : [ "string", "null" ]
          }
        }, {
          "name" : "surname",
          "in" : "query",
          "schema" : {
            "type" : [ "string", "null" ]
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginationDTONaturalPersonDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/natural-person/address-book/bulk" : {
      "post" : {
        "summary" : "Add persons with address book",
        "tags" : [ "Persons" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "$ref" : "#/components/schemas/NaturalPersonAddressDTO"
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/NaturalPersonsBulk"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/natural-person/all" : {
      "get" : {
        "summary" : "Get all natural persons without pagination. It's used by CommonAPI for DB initialization",
        "tags" : [ "Persons" ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/NaturalPersonDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/natural-person/bulk" : {
      "post" : {
        "summary" : "Create a list of natural persons",
        "tags" : [ "Persons" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "$ref" : "#/components/schemas/NewNaturalPersonDTO"
                }
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/NaturalPersonDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/natural-person/count" : {
      "get" : {
        "summary" : "Get count of persons",
        "tags" : [ "Persons" ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "text/plain" : {
                "schema" : {
                  "type" : "integer",
                  "format" : "int64"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/natural-person/id-address-book/{idAddressBook}" : {
      "get" : {
        "summary" : "Get a list of persons by studies group",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "idAddressBook",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/NaturalPerson"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/natural-person/ids" : {
      "get" : {
        "summary" : "Get a list of natural persons by IDs",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "query",
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/NaturalPersonDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/persons/natural-person/index/{index}/size/{size}" : {
      "get" : {
        "summary" : "Get all natural persons with page and size. You may optionally specify sort column and direction.",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "index",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "size",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "city",
          "in" : "query",
          "schema" : {
            "type" : [ "string", "null" ]
          }
        }, {
          "name" : "direction",
          "in" : "query",
          "schema" : {
            "type" : "string",
            "default" : "asc"
          },
          "required" : true
        }, {
          "name" : "emailAddress",
          "in" : "query",
          "schema" : {
            "type" : [ "string", "null" ]
          }
        }, {
          "name" : "firstName",
          "in" : "query",
          "schema" : {
            "type" : [ "string", "null" ]
          }
        }, {
          "name" : "fiscalCode",
          "in" : "query",
          "schema" : {
            "type" : [ "string", "null" ]
          }
        }, {
          "name" : "sortedBy",
          "in" : "query",
          "schema" : {
            "type" : "string",
            "default" : "fiscalCode"
          },
          "required" : true
        }, {
          "name" : "surname",
          "in" : "query",
          "schema" : {
            "type" : [ "string", "null" ]
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginationDTONaturalPersonDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/natural-person/latest/fiscal-code/{fiscalCode}" : {
      "get" : {
        "summary" : "Get latest valid natural person by fiscal code",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "fiscalCode",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/NaturalPersonDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/natural-person/search/{search}/index/{index}/size/{size}" : {
      "get" : {
        "summary" : "Get natural persons filtered by fiscal code, surname or email",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "index",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "search",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "size",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginationDTONaturalPersonDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/natural-person/username/{username}" : {
      "get" : {
        "summary" : "Get natural person by username",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "username",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/NaturalPersonDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/natural-person/{id}" : {
      "patch" : {
        "summary" : "Update a natural person birth date",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/BirthDateDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/NaturalPersonDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      },
      "put" : {
        "summary" : "Update a natural person",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/NewNaturalPersonDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/NaturalPersonDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      },
      "get" : {
        "summary" : "Get natural person by ID",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/NaturalPersonDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/natural-persons/fiscal-code/{fiscalCode}" : {
      "get" : {
        "summary" : "Get all natural persons by fiscal code",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "fiscalCode",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "valid",
          "in" : "query",
          "schema" : {
            "type" : "boolean",
            "default" : true
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/NaturalPersonDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/person-full/ids" : {
      "get" : {
        "summary" : "Get a list of persons as persons full by given ids",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "query",
          "schema" : {
            "type" : "array",
            "items" : {
              "type" : "string"
            }
          },
          "required" : true
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/PersonFullDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/person-full/{idPerson}" : {
      "get" : {
        "summary" : "Get a person as a person full by given idPerson",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "idPerson",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PersonFullDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/persons/{id}" : {
      "delete" : {
        "summary" : "Delete a person (natural person or legal entity)",
        "tags" : [ "Persons" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ResultDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/registers/code/{code}" : {
      "get" : {
        "summary" : "Get a register by code",
        "tags" : [ "Register Controller" ],
        "parameters" : [ {
          "name" : "code",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RegisterDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/services" : {
      "get" : {
        "summary" : "Get all APIs services",
        "tags" : [ "Service Controller" ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/ServiceDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/services/index/{index}/size/{size}" : {
      "get" : {
        "summary" : "Get all APIs services with pagination",
        "tags" : [ "Service Controller" ],
        "parameters" : [ {
          "name" : "index",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "size",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginationDTOServiceDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/users" : {
      "post" : {
        "summary" : "Register a new user for automation purposes only",
        "tags" : [ "Users" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/NewUibmUserDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UibmUserDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      },
      "get" : {
        "summary" : "Get all users with default pagination",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "group",
          "in" : "query",
          "schema" : {
            "type" : [ "string", "null" ]
          }
        }, {
          "name" : "username",
          "in" : "query",
          "schema" : {
            "type" : [ "string", "null" ]
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginationDTOUibmUserDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/users/by-ids" : {
      "post" : {
        "summary" : "Get users by id list",
        "tags" : [ "Users" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "type" : "array",
                "items" : {
                  "type" : "string"
                },
                "minItems" : 1
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/UibmUserDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/users/by-person-ids" : {
      "post" : {
        "summary" : "Users by person id batch",
        "description" : "Up to 200 ids; order not defined.",
        "tags" : [ "Users" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ByPersonIdsRequestDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/UibmUserDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/users/complete-registration" : {
      "post" : {
        "summary" : "Complete registration of a new foreign user",
        "tags" : [ "Users" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UibmUserNewDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ResultDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/users/delegate/organization/{organization}" : {
      "patch" : {
        "summary" : "Add users delegate process role",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "organization",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/AddDelegateProcessRoleDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/UibmUserDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/users/fiscal-code/{fiscalCode}" : {
      "get" : {
        "summary" : "Get user by ID",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "fiscalCode",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UibmUserDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/users/index/{index}/size/{size}" : {
      "get" : {
        "summary" : "Get all users with page and size. You may optionally specify sort column and direction",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "index",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "size",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "direction",
          "in" : "query",
          "schema" : {
            "type" : "string",
            "default" : "asc"
          },
          "required" : true
        }, {
          "name" : "group",
          "in" : "query",
          "schema" : {
            "type" : [ "string", "null" ]
          }
        }, {
          "name" : "sortedBy",
          "in" : "query",
          "schema" : {
            "type" : "string",
            "default" : "username"
          },
          "required" : true
        }, {
          "name" : "username",
          "in" : "query",
          "schema" : {
            "type" : [ "string", "null" ]
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginationDTOUibmUserDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/users/iscritti" : {
      "get" : {
        "summary" : "Enrolled mandatari, first page",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "description" : "Substring match on roles[].agentRegistrationCode",
          "name" : "agentRegistrationCode",
          "in" : "query",
          "schema" : {
            "description" : "Substring match on roles[].agentRegistrationCode",
            "type" : [ "string", "null" ]
          }
        }, {
          "description" : "Optional: restrict roles by patent vs mark authorization when flag values are Y/N style. PATENTS: flagPatent active; MARKS: flagMark active; BOTH: both active on the same role.",
          "name" : "authorizationScope",
          "in" : "query",
          "schema" : {
            "description" : "PATENTS | MARKS | BOTH — refines role match (Y/N style flags)",
            "type" : [ "object", "null" ]
          }
        }, {
          "description" : "Substring match on person.firstName (case-insensitive)",
          "name" : "firstName",
          "in" : "query",
          "schema" : {
            "description" : "Substring match on person.firstName (case-insensitive)",
            "type" : [ "string", "null" ]
          }
        }, {
          "description" : "Substring match on person.fiscalCode (case-insensitive)",
          "name" : "fiscalCode",
          "in" : "query",
          "schema" : {
            "description" : "Substring match on person.fiscalCode (case-insensitive)",
            "type" : [ "string", "null" ]
          }
        }, {
          "description" : "Substring match on roles[].flagMark",
          "name" : "flagMark",
          "in" : "query",
          "schema" : {
            "description" : "Substring match on roles[].flagMark",
            "type" : [ "string", "null" ]
          }
        }, {
          "description" : "Substring match on roles[].flagPatent (e.g. S/N or domain-specific values)",
          "name" : "flagPatent",
          "in" : "query",
          "schema" : {
            "description" : "Substring match on roles[].flagPatent",
            "type" : [ "string", "null" ]
          }
        }, {
          "description" : "Exact match on roles[].flagState (A/B/C)",
          "name" : "flagState",
          "in" : "query",
          "schema" : {
            "description" : "Exact match on roles[].flagState",
            "type" : [ "object", "null" ]
          }
        }, {
          "description" : "Substring match on roles[].foreignCountry (case-insensitive), e.g. MANE paese",
          "name" : "foreignCountry",
          "in" : "query",
          "schema" : {
            "description" : "Substring on roles[].foreignCountry (MANE / estero)",
            "type" : [ "string", "null" ]
          }
        }, {
          "description" : "Substring match on roles[].foreignRegistrationNumber (case-insensitive)",
          "name" : "foreignRegistrationNumber",
          "in" : "query",
          "schema" : {
            "description" : "Substring on roles[].foreignRegistrationNumber (codice albo estero / riferimento)",
            "type" : [ "string", "null" ]
          }
        }, {
          "description" : "Exact match on roles[].kindOfRole.code (e.g. MAN mandatario italiano, MANE mandatario estero)",
          "name" : "kindOfRoleCode",
          "in" : "query",
          "schema" : {
            "description" : "Exact match on roles[].kindOfRole.code (MAN, MANE for foreign-mandataries Deposito screen, …)",
            "type" : [ "object", "null" ]
          }
        }, {
          "description" : "Substring match on roles[].lawyerRegistrationCode",
          "name" : "lawyerRegistrationCode",
          "in" : "query",
          "schema" : {
            "description" : "Substring match on roles[].lawyerRegistrationCode",
            "type" : [ "string", "null" ]
          }
        }, {
          "description" : "Substring match on person.surname (case-insensitive)",
          "name" : "surname",
          "in" : "query",
          "schema" : {
            "description" : "Substring match on person.surname (case-insensitive)",
            "type" : [ "string", "null" ]
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginationDTOUibmUserDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/users/iscritti/index/{index}/size/{size}" : {
      "get" : {
        "summary" : "Enrolled mandatari (grid)",
        "description" : "Filters: name, surname, CF, registers, state, role kind MAN/MANE.",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "index",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "size",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "description" : "Substring match on roles[].agentRegistrationCode",
          "name" : "agentRegistrationCode",
          "in" : "query",
          "schema" : {
            "description" : "Substring match on roles[].agentRegistrationCode",
            "type" : [ "string", "null" ]
          }
        }, {
          "description" : "Optional: restrict roles by patent vs mark authorization when flag values are Y/N style. PATENTS: flagPatent active; MARKS: flagMark active; BOTH: both active on the same role.",
          "name" : "authorizationScope",
          "in" : "query",
          "schema" : {
            "description" : "PATENTS | MARKS | BOTH — refines role match (Y/N style flags)",
            "type" : [ "object", "null" ]
          }
        }, {
          "name" : "direction",
          "in" : "query",
          "schema" : {
            "type" : "string",
            "default" : "asc"
          },
          "required" : true
        }, {
          "description" : "Substring match on person.firstName (case-insensitive)",
          "name" : "firstName",
          "in" : "query",
          "schema" : {
            "description" : "Substring match on person.firstName (case-insensitive)",
            "type" : [ "string", "null" ]
          }
        }, {
          "description" : "Substring match on person.fiscalCode (case-insensitive)",
          "name" : "fiscalCode",
          "in" : "query",
          "schema" : {
            "description" : "Substring match on person.fiscalCode (case-insensitive)",
            "type" : [ "string", "null" ]
          }
        }, {
          "description" : "Substring match on roles[].flagMark",
          "name" : "flagMark",
          "in" : "query",
          "schema" : {
            "description" : "Substring match on roles[].flagMark",
            "type" : [ "string", "null" ]
          }
        }, {
          "description" : "Substring match on roles[].flagPatent (e.g. S/N or domain-specific values)",
          "name" : "flagPatent",
          "in" : "query",
          "schema" : {
            "description" : "Substring match on roles[].flagPatent",
            "type" : [ "string", "null" ]
          }
        }, {
          "description" : "Exact match on roles[].flagState (A/B/C)",
          "name" : "flagState",
          "in" : "query",
          "schema" : {
            "description" : "Exact match on roles[].flagState",
            "type" : [ "object", "null" ]
          }
        }, {
          "description" : "Substring match on roles[].foreignCountry (case-insensitive), e.g. MANE paese",
          "name" : "foreignCountry",
          "in" : "query",
          "schema" : {
            "description" : "Substring on roles[].foreignCountry (MANE / estero)",
            "type" : [ "string", "null" ]
          }
        }, {
          "description" : "Substring match on roles[].foreignRegistrationNumber (case-insensitive)",
          "name" : "foreignRegistrationNumber",
          "in" : "query",
          "schema" : {
            "description" : "Substring on roles[].foreignRegistrationNumber (codice albo estero / riferimento)",
            "type" : [ "string", "null" ]
          }
        }, {
          "description" : "Exact match on roles[].kindOfRole.code (e.g. MAN mandatario italiano, MANE mandatario estero)",
          "name" : "kindOfRoleCode",
          "in" : "query",
          "schema" : {
            "description" : "Exact match on roles[].kindOfRole.code (MAN, MANE for foreign-mandataries Deposito screen, …)",
            "type" : [ "object", "null" ]
          }
        }, {
          "description" : "Substring match on roles[].lawyerRegistrationCode",
          "name" : "lawyerRegistrationCode",
          "in" : "query",
          "schema" : {
            "description" : "Substring match on roles[].lawyerRegistrationCode",
            "type" : [ "string", "null" ]
          }
        }, {
          "name" : "sortedBy",
          "in" : "query",
          "schema" : {
            "type" : "string",
            "default" : "surname"
          },
          "required" : true
        }, {
          "description" : "Substring match on person.surname (case-insensitive)",
          "name" : "surname",
          "in" : "query",
          "schema" : {
            "description" : "Substring match on person.surname (case-insensitive)",
            "type" : [ "string", "null" ]
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginationDTOUibmUserDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/users/login" : {
      "post" : {
        "summary" : "Login",
        "tags" : [ "Users" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/LoginDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UibmUserDTO"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad Request"
          }
        }
      }
    },
    "/api/users/login/gepi" : {
      "post" : {
        "summary" : "Special Login for GEPI",
        "tags" : [ "Users" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/GepiLoginDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/GepiUserDto"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad Request"
          }
        }
      }
    },
    "/api/users/login/spid" : {
      "post" : {
        "summary" : "Login with spid",
        "tags" : [ "Users" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/SubjectDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UibmUserDTO"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad Request"
          }
        }
      }
    },
    "/api/users/operator" : {
      "get" : {
        "summary" : "Get user's operators",
        "tags" : [ "Users" ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/UibmUserDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/users/operator/{id}" : {
      "delete" : {
        "summary" : "Delete a user's operator",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ResultDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/users/organization/{organization}" : {
      "get" : {
        "summary" : "Get examiner users by given organization",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "organization",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/UibmUserDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/users/organization/{organization}/role/{role}" : {
      "get" : {
        "summary" : "Get users by given organization and process role",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "organization",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "role",
          "in" : "path",
          "required" : true,
          "schema" : {
            "$ref" : "#/components/schemas/WFProcessRole"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "$ref" : "#/components/schemas/UibmUserDTO"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/users/organizations" : {
      "get" : {
        "summary" : "Get all available organizations",
        "tags" : [ "Users" ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "type" : "string"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/users/password/change" : {
      "post" : {
        "summary" : "Change password",
        "tags" : [ "Users" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/ChangePasswordDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/users/password/requestreset" : {
      "post" : {
        "summary" : "Request a password reset",
        "tags" : [ "Users" ],
        "requestBody" : {
          "content" : {
            "text/plain" : {
              "schema" : {
                "type" : "string"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/users/password/reset" : {
      "post" : {
        "summary" : "Apply a password reset request",
        "tags" : [ "Users" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PasswordResetDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "400" : {
            "description" : "Bad Request"
          }
        }
      }
    },
    "/api/users/process-roles" : {
      "get" : {
        "summary" : "Get all available process roles",
        "tags" : [ "Users" ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "type" : "array",
                  "items" : {
                    "type" : "string"
                  }
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/users/register" : {
      "post" : {
        "summary" : "Send registration mail to new foreign user",
        "tags" : [ "Users" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RegistrationEmailDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "text/plain" : {
                "schema" : {
                  "type" : "string"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/users/register/operator" : {
      "post" : {
        "summary" : "Register a new second level operator",
        "tags" : [ "Users" ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/OperatorNewDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "text/plain" : {
                "schema" : {
                  "type" : "boolean"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/users/registration-token/{id}" : {
      "get" : {
        "summary" : "Get registration token by id",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/RegistrationTokenDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/users/search/{search}/index/{index}/size/{size}" : {
      "get" : {
        "summary" : "Get users filtered by email, surname or username",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "index",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        }, {
          "name" : "search",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "name" : "size",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "integer",
            "format" : "int32"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PaginationDTOUibmUserDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/users/user/person/{id}" : {
      "get" : {
        "summary" : "Get user by person id",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UibmUserDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      }
    },
    "/api/users/username/{username}" : {
      "get" : {
        "summary" : "Get user by username",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "username",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UibmUserDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/users/{id}" : {
      "get" : {
        "summary" : "Get user by ID",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UibmUserDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      },
      "put" : {
        "summary" : "Edit user by ID",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/NewUibmUserDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ResultDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          },
          "400" : {
            "description" : "Bad Request"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN", "USER" ]
        } ]
      },
      "delete" : {
        "summary" : "Delete a user",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "id",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ResultDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    },
    "/api/users/{username}/autosign-list" : {
      "patch" : {
        "summary" : "update user autoSignList ",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "username",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateAutoOperationDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "text/plain" : {
                "schema" : {
                  "type" : "boolean"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/users/{username}/autoverify-list" : {
      "patch" : {
        "summary" : "update user autoVerifyList",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "username",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateAutoOperationDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "text/plain" : {
                "schema" : {
                  "type" : "boolean"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/users/{username}/email" : {
      "patch" : {
        "summary" : "update email address",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "username",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateEmailInfoDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "text/plain" : {
                "schema" : {
                  "type" : "boolean"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/users/{username}/favorite-applications" : {
      "patch" : {
        "summary" : "Add or remove favorite application from user",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "username",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/UpdateFavoriteApplicationsDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "text/plain" : {
                "schema" : {
                  "type" : "boolean"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/users/{username}/language" : {
      "patch" : {
        "summary" : "Update user's language",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "username",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/LanguageDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UibmUserDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/users/{username}/privacy-indicator" : {
      "patch" : {
        "summary" : "Update user's privacy indicator",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "username",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PrivacyIndicatorDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UibmUserDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/users/{username}/role" : {
      "patch" : {
        "summary" : "Request new role",
        "description" : "Adds a role application; does not patch existing. Use PATCH …/role/patch to update.",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "username",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RoleRequestDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UibmUserDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/users/{username}/role/activate" : {
      "patch" : {
        "summary" : "Activate user's role",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "username",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RoleActivateDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UibmUserDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "USER", "ADMIN" ]
        } ]
      }
    },
    "/api/users/{username}/role/patch" : {
      "patch" : {
        "summary" : "Patch existing role fields",
        "description" : "Match by idKindOfRole and optional foreignCountry.",
        "tags" : [ "Users" ],
        "parameters" : [ {
          "name" : "username",
          "in" : "path",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/RolePatchRequestDTO"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "description" : "OK",
            "content" : {
              "application/json" : {
                "schema" : {
                  "$ref" : "#/components/schemas/UibmUserDTO"
                }
              }
            }
          },
          "401" : {
            "description" : "Not Authorized"
          },
          "403" : {
            "description" : "Not Allowed"
          }
        },
        "security" : [ {
          "BearerAuth" : [ "ADMIN" ]
        } ]
      }
    }
  },
  "info" : {
    "title" : "DigitalIdentity API",
    "version" : "0.27.1",
    "description" : "Digital Identity services for UIBM Applications",
    "contact" : {
      "name" : "IBM Consulting Italy",
      "email" : "info@it.ibm.com"
    }
  }
}