{
  "components": {
    "parameters": {
      "AccessApplication": {
        "in": "query",
        "name": "application",
        "schema": {
          "type": "string"
        }
      },
      "AccessApprover": {
        "in": "query",
        "name": "approver",
        "schema": {
          "type": "string"
        }
      },
      "AccessRequesterID": {
        "in": "query",
        "name": "requester_id",
        "schema": {
          "type": "string"
        }
      },
      "AccessStatus": {
        "in": "query",
        "name": "status",
        "schema": {
          "enum": [
            "pending",
            "approved",
            "rejected"
          ],
          "type": "string"
        }
      },
      "AuditAction": {
        "in": "query",
        "name": "action",
        "schema": {
          "type": "string"
        }
      },
      "AuditFrom": {
        "in": "query",
        "name": "from",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "AuditIdentityID": {
        "in": "query",
        "name": "identity_id",
        "schema": {
          "type": "string"
        }
      },
      "AuditTo": {
        "in": "query",
        "name": "to",
        "schema": {
          "format": "date-time",
          "type": "string"
        }
      },
      "Collective": {
        "in": "query",
        "name": "collective",
        "schema": {
          "type": "string"
        }
      },
      "CollectivePath": {
        "in": "path",
        "name": "collective",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "GuestPortalSlug": {
        "in": "path",
        "name": "slug",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "IdentityID": {
        "in": "path",
        "name": "id",
        "required": true,
        "schema": {
          "type": "string"
        }
      },
      "IncludeProfile": {
        "in": "query",
        "name": "include_profile",
        "schema": {
          "type": "boolean"
        }
      },
      "IncludeSensitive": {
        "in": "query",
        "name": "include_sensitive",
        "schema": {
          "type": "boolean"
        }
      },
      "Page": {
        "in": "query",
        "name": "page",
        "schema": {
          "default": 1,
          "minimum": 1,
          "type": "integer"
        }
      },
      "PageSize": {
        "in": "query",
        "name": "page_size",
        "schema": {
          "default": 50,
          "minimum": 1,
          "type": "integer"
        }
      },
      "RecertificationApplication": {
        "in": "query",
        "name": "application",
        "schema": {
          "type": "string"
        }
      },
      "RecertificationReviewer": {
        "in": "query",
        "name": "reviewer",
        "schema": {
          "type": "string"
        }
      },
      "RecertificationRisk": {
        "in": "query",
        "name": "risk",
        "schema": {
          "enum": [
            "low",
            "medium",
            "high"
          ],
          "type": "string"
        }
      },
      "RecertificationStage": {
        "in": "query",
        "name": "stage",
        "schema": {
          "enum": [
            "pending",
            "in_review",
            "escalated",
            "approved",
            "revoked"
          ],
          "type": "string"
        }
      },
      "Source": {
        "in": "query",
        "name": "source",
        "schema": {
          "type": "string"
        }
      },
      "Status": {
        "in": "query",
        "name": "status",
        "schema": {
          "enum": [
            "active",
            "inactive"
          ],
          "type": "string"
        }
      }
    },
    "responses": {
      "JsonError": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            }
          }
        },
        "description": "Error JSON devuelto por el servicio",
        "headers": {
          "X-Request-ID": {
            "description": "Identificador de la petición para trazabilidad extremo a extremo.",
            "schema": {
              "type": "string"
            }
          }
        }
      }
    },
    "schemas": {
      "APIClient": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "groups": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "scope": {
            "$ref": "#/components/schemas/APIClientScope"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "permissions",
          "active",
          "created_at",
          "updated_at"
        ],
        "type": "object"
      },
      "APIClientCredentialResponse": {
        "properties": {
          "client": {
            "$ref": "#/components/schemas/APIClient"
          },
          "issued_api_key": {
            "type": "string"
          }
        },
        "required": [
          "client"
        ],
        "type": "object"
      },
      "APIClientScope": {
        "properties": {
          "applications": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "collectives": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "APIClientUpsertRequest": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "api_key": {
            "type": "string"
          },
          "groups": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "scope": {
            "$ref": "#/components/schemas/APIClientScope"
          }
        },
        "required": [
          "id",
          "name",
          "permissions"
        ],
        "type": "object"
      },
      "AccessBreakdownEntry": {
        "properties": {
          "count": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "pending": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "AccessRequest": {
        "properties": {
          "application": {
            "type": "string"
          },
          "approverID": {
            "type": "string"
          },
          "approverName": {
            "type": "string"
          },
          "collective": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "entitlement": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "justification": {
            "type": "string"
          },
          "last_decision": {
            "$ref": "#/components/schemas/AccessRequestDecision"
          },
          "requesterID": {
            "type": "string"
          },
          "risk": {
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "pending",
              "approved",
              "rejected"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "AccessRequestDecision": {
        "properties": {
          "approver": {
            "type": "string"
          },
          "comment": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "decision": {
            "enum": [
              "approved",
              "rejected"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "AccessRequestDecisionRequest": {
        "properties": {
          "approver": {
            "type": "string"
          },
          "comment": {
            "type": "string"
          },
          "decision": {
            "enum": [
              "approved",
              "rejected"
            ],
            "type": "string"
          }
        },
        "required": [
          "decision"
        ],
        "type": "object"
      },
      "AccessRequestDetail": {
        "properties": {
          "history": {
            "items": {
              "$ref": "#/components/schemas/AccessRequestDecision"
            },
            "type": "array"
          },
          "item": {
            "$ref": "#/components/schemas/AccessRequest"
          }
        },
        "type": "object"
      },
      "AccessRequestSummary": {
        "properties": {
          "approved_today": {
            "type": "integer"
          },
          "by_application": {
            "items": {
              "$ref": "#/components/schemas/AccessBreakdownEntry"
            },
            "type": "array"
          },
          "by_approver": {
            "items": {
              "$ref": "#/components/schemas/AccessBreakdownEntry"
            },
            "type": "array"
          },
          "pending": {
            "type": "integer"
          },
          "rejected": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Attribute": {
        "properties": {
          "name": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          },
          "sensitive": {
            "type": "boolean"
          },
          "type": {
            "enum": [
              "string",
              "boolean"
            ],
            "type": "string"
          }
        },
        "required": [
          "name",
          "type"
        ],
        "type": "object"
      },
      "AuditEvent": {
        "properties": {
          "action": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "details": {
            "type": "string"
          },
          "identity_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "CatalogApplication": {
        "properties": {
          "entitlements": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "name": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "ErrorResponse": {
        "properties": {
          "code": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "request_id": {
            "description": "Copia del identificador devuelto en la cabecera X-Request-ID.",
            "type": "string"
          }
        },
        "required": [
          "code",
          "error"
        ],
        "type": "object"
      },
      "GuestInvitationResult": {
        "properties": {
          "invitation_id": {
            "type": "string"
          },
          "invitation_url": {
            "format": "uri",
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "target_group_id": {
            "type": "string"
          },
          "target_user_id": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "GuestPortal": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "allowed_email_domains": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "application": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "form_fields": {
            "items": {
              "$ref": "#/components/schemas/GuestPortalFormField"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "operation": {
            "enum": [
              "signup",
              "modify",
              "deprovision"
            ],
            "type": "string"
          },
          "redirect_uri": {
            "format": "uri",
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "target_group_id": {
            "type": "string"
          },
          "target_group_name": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "target_group_id",
          "active"
        ],
        "type": "object"
      },
      "GuestPortalFormField": {
        "properties": {
          "help_text": {
            "type": "string"
          },
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "options": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "placeholder": {
            "type": "string"
          },
          "project_to_idp": {
            "type": "boolean"
          },
          "required": {
            "type": "boolean"
          },
          "type": {
            "enum": [
              "text",
              "textarea",
              "email"
            ],
            "type": "string"
          }
        },
        "required": [
          "key",
          "label"
        ],
        "type": "object"
      },
      "GuestPortalPublic": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "allowed_email_domains": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "application": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "form_fields": {
            "items": {
              "$ref": "#/components/schemas/GuestPortalFormField"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "operation": {
            "enum": [
              "signup",
              "modify",
              "deprovision"
            ],
            "type": "string"
          },
          "redirect_uri": {
            "format": "uri",
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "target_group_name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "active"
        ],
        "type": "object"
      },
      "GuestPortalSignupRequest": {
        "properties": {
          "company": {
            "type": "string"
          },
          "email": {
            "format": "email",
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "justification": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          }
        },
        "required": [
          "email"
        ],
        "type": "object"
      },
      "GuestPortalSignupResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/GuestPortalSubmissionResponse"
          }
        ]
      },
      "GuestPortalSubmissionDecisionRequest": {
        "properties": {
          "comment": {
            "type": "string"
          },
          "decision": {
            "enum": [
              "approved",
              "rejected"
            ],
            "type": "string"
          },
          "reviewer": {
            "type": "string"
          }
        },
        "required": [
          "decision"
        ],
        "type": "object"
      },
      "GuestPortalSubmissionRecord": {
        "properties": {
          "application": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "invitation_id": {
            "type": "string"
          },
          "invitation_url": {
            "format": "uri",
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "operation": {
            "enum": [
              "signup",
              "modify",
              "deprovision"
            ],
            "type": "string"
          },
          "portal_id": {
            "type": "string"
          },
          "portal_name": {
            "type": "string"
          },
          "portal_slug": {
            "type": "string"
          },
          "processing_mode": {
            "enum": [
              "automatic",
              "manual_review"
            ],
            "type": "string"
          },
          "requested_email": {
            "type": "string"
          },
          "review_comment": {
            "type": "string"
          },
          "reviewed_at": {
            "format": "date-time",
            "type": "string"
          },
          "reviewed_by": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "submitted_at": {
            "format": "date-time",
            "type": "string"
          },
          "target_group_id": {
            "type": "string"
          },
          "target_user_id": {
            "type": "string"
          },
          "values": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "id",
          "portal_id",
          "operation",
          "status",
          "values"
        ],
        "type": "object"
      },
      "GuestPortalSubmissionRequest": {
        "properties": {
          "values": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "values"
        ],
        "type": "object"
      },
      "GuestPortalSubmissionResponse": {
        "properties": {
          "portal": {
            "$ref": "#/components/schemas/GuestPortal"
          },
          "result": {
            "$ref": "#/components/schemas/GuestPortalSubmissionResult"
          }
        },
        "required": [
          "portal",
          "result"
        ],
        "type": "object"
      },
      "GuestPortalSubmissionResult": {
        "properties": {
          "invitation_id": {
            "type": "string"
          },
          "invitation_url": {
            "format": "uri",
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "processing_mode": {
            "enum": [
              "automatic",
              "manual_review"
            ],
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "target_group_id": {
            "type": "string"
          },
          "target_user_id": {
            "type": "string"
          },
          "values": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "GuestPortalUpsertRequest": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "allowed_email_domains": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "application": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "form_fields": {
            "items": {
              "$ref": "#/components/schemas/GuestPortalFormField"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "operation": {
            "enum": [
              "signup",
              "modify",
              "deprovision"
            ],
            "type": "string"
          },
          "redirect_uri": {
            "format": "uri",
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "target_group_id": {
            "type": "string"
          },
          "target_group_name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "slug",
          "target_group_id"
        ],
        "type": "object"
      },
      "Identity": {
        "properties": {
          "collective": {
            "type": "string"
          },
          "department": {
            "type": "string"
          },
          "deprovisioned": {
            "type": "boolean"
          },
          "email": {
            "format": "email",
            "type": "string"
          },
          "external_id": {
            "type": "string"
          },
          "first_name": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "last_name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "enum": [
              "active",
              "inactive"
            ],
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "source",
          "email"
        ],
        "type": "object"
      },
      "IdentityWithProfile": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Identity"
          },
          {
            "properties": {
              "profile": {
                "$ref": "#/components/schemas/Profile"
              }
            },
            "type": "object"
          }
        ]
      },
      "OIDCOperatorSession": {
        "properties": {
          "email": {
            "type": "string"
          },
          "established_at": {
            "format": "date-time",
            "type": "string"
          },
          "expires_at": {
            "format": "date-time",
            "type": "string"
          },
          "groups": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "idp": {
            "type": "string"
          },
          "issuer": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "preferred_username": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "subject": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "OIDCProviderInfo": {
        "properties": {
          "client_id_configured": {
            "type": "boolean"
          },
          "client_secret_configured": {
            "type": "boolean"
          },
          "display_name": {
            "type": "string"
          },
          "idp": {
            "type": "string"
          },
          "issuer_url": {
            "format": "uri",
            "type": "string"
          },
          "managed": {
            "type": "boolean"
          },
          "redirect_uri": {
            "format": "uri",
            "type": "string"
          },
          "token_endpoint_auth_method": {
            "enum": [
              "auto",
              "none",
              "client_secret_post",
              "client_secret_basic"
            ],
            "type": "string"
          }
        },
        "required": [
          "idp",
          "display_name",
          "managed",
          "token_endpoint_auth_method",
          "client_id_configured",
          "client_secret_configured"
        ],
        "type": "object"
      },
      "OIDCProvidersResponse": {
        "properties": {
          "providers": {
            "items": {
              "$ref": "#/components/schemas/OIDCProviderInfo"
            },
            "type": "array"
          },
          "request_id": {
            "type": "string"
          }
        },
        "required": [
          "providers"
        ],
        "type": "object"
      },
      "OIDCSessionResponse": {
        "properties": {
          "authenticated": {
            "type": "boolean"
          },
          "request_id": {
            "type": "string"
          },
          "session": {
            "$ref": "#/components/schemas/OIDCOperatorSession"
          }
        },
        "required": [
          "authenticated"
        ],
        "type": "object"
      },
      "OIDCTestStartRequest": {
        "description": "Si `idp` corresponde a un proveedor gestionado por la aplicación, el backend resuelve `issuerUrl`, `clientId`, `clientSecret` y opcionalmente `redirectUri` desde su configuración runtime.\n\nPara IdPs no gestionados por backend, el caller debe seguir enviando `issuerUrl` y `clientId`. `clientSecret` es opcional para clientes PKCE públicos. `tokenEndpointAuthMethod` admite `none`, `client_secret_post`, `client_secret_basic` o `auto`.\n",
        "properties": {
          "clientId": {
            "type": "string"
          },
          "clientSecret": {
            "type": "string"
          },
          "idp": {
            "type": "string"
          },
          "issuerUrl": {
            "format": "uri",
            "type": "string"
          },
          "redirectUri": {
            "format": "uri",
            "type": "string"
          },
          "tokenEndpointAuthMethod": {
            "enum": [
              "auto",
              "none",
              "client_secret_post",
              "client_secret_basic"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "OIDCTestStartResponse": {
        "properties": {
          "authorization_url": {
            "format": "uri",
            "type": "string"
          },
          "issuer": {
            "type": "string"
          },
          "redirect_uri": {
            "format": "uri",
            "type": "string"
          },
          "request_id": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "PaginatedAPIClientList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          {
            "properties": {
              "items": {
                "items": {
                  "$ref": "#/components/schemas/APIClient"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "PaginatedAccessRequestList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          {
            "properties": {
              "items": {
                "items": {
                  "$ref": "#/components/schemas/AccessRequest"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "PaginatedAuditEventList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          {
            "properties": {
              "items": {
                "items": {
                  "$ref": "#/components/schemas/AuditEvent"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "PaginatedGuestPortalList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          {
            "properties": {
              "items": {
                "items": {
                  "$ref": "#/components/schemas/GuestPortal"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "PaginatedGuestPortalSubmissionList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          {
            "properties": {
              "items": {
                "items": {
                  "$ref": "#/components/schemas/GuestPortalSubmissionRecord"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "PaginatedIdentityList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          {
            "properties": {
              "items": {
                "items": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Identity"
                    },
                    {
                      "$ref": "#/components/schemas/IdentityWithProfile"
                    }
                  ]
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "PaginatedPortalUserList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          {
            "properties": {
              "items": {
                "items": {
                  "$ref": "#/components/schemas/PortalUser"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "PaginatedRecertificationList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          {
            "properties": {
              "items": {
                "items": {
                  "$ref": "#/components/schemas/RecertificationItem"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "PaginatedSchemaList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          {
            "properties": {
              "items": {
                "items": {
                  "$ref": "#/components/schemas/Schema"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "PaginatedSchemaVersionList": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaginationMeta"
          },
          {
            "properties": {
              "items": {
                "items": {
                  "$ref": "#/components/schemas/SchemaVersion"
                },
                "type": "array"
              }
            },
            "type": "object"
          }
        ]
      },
      "PaginationMeta": {
        "properties": {
          "page": {
            "type": "integer"
          },
          "page_size": {
            "type": "integer"
          },
          "total": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "PortalUser": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "claim_groups": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "display_name": {
            "type": "string"
          },
          "effective_groups": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "email": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "managed_groups": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "preferred_username": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "active"
        ],
        "type": "object"
      },
      "PortalUserUpsertRequest": {
        "properties": {
          "active": {
            "type": "boolean"
          },
          "display_name": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "groups": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "type": "string"
          },
          "preferred_username": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "groups"
        ],
        "type": "object"
      },
      "Profile": {
        "additionalProperties": true,
        "type": "object"
      },
      "RecertificationBreakdownEntry": {
        "properties": {
          "count": {
            "type": "integer"
          },
          "high_risk": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "open": {
            "type": "integer"
          },
          "overdue": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "RecertificationDecision": {
        "properties": {
          "comment": {
            "type": "string"
          },
          "created_at": {
            "format": "date-time",
            "type": "string"
          },
          "decision": {
            "enum": [
              "approved",
              "revoked",
              "escalated",
              "in_review"
            ],
            "type": "string"
          },
          "reviewer": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "RecertificationDecisionRequest": {
        "properties": {
          "comment": {
            "type": "string"
          },
          "decision": {
            "enum": [
              "approved",
              "revoked",
              "escalated",
              "in_review"
            ],
            "type": "string"
          },
          "reviewer": {
            "type": "string"
          }
        },
        "required": [
          "decision"
        ],
        "type": "object"
      },
      "RecertificationDetail": {
        "properties": {
          "history": {
            "items": {
              "$ref": "#/components/schemas/RecertificationDecision"
            },
            "type": "array"
          },
          "item": {
            "$ref": "#/components/schemas/RecertificationItem"
          }
        },
        "type": "object"
      },
      "RecertificationItem": {
        "properties": {
          "application": {
            "type": "string"
          },
          "collective": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "dueDays": {
            "type": "integer"
          },
          "evidence": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "identityID": {
            "type": "string"
          },
          "last_decision": {
            "$ref": "#/components/schemas/RecertificationDecision"
          },
          "reviewer": {
            "type": "string"
          },
          "risk": {
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "stage": {
            "enum": [
              "pending",
              "in_review",
              "escalated",
              "approved",
              "revoked"
            ],
            "type": "string"
          },
          "type": {
            "enum": [
              "account",
              "role",
              "entitlement"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "RecertificationSummary": {
        "properties": {
          "applications": {
            "items": {
              "$ref": "#/components/schemas/RecertificationBreakdownEntry"
            },
            "type": "array"
          },
          "by_stage": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object"
          },
          "completed": {
            "type": "integer"
          },
          "due_soon": {
            "type": "integer"
          },
          "high_risk": {
            "type": "integer"
          },
          "reviewers": {
            "items": {
              "$ref": "#/components/schemas/RecertificationBreakdownEntry"
            },
            "type": "array"
          },
          "total": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "Schema": {
        "properties": {
          "allowed_sources": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "allowed_targets": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "attributes": {
            "items": {
              "$ref": "#/components/schemas/Attribute"
            },
            "type": "array"
          },
          "collective": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "updated_at": {
            "format": "date-time",
            "type": "string"
          },
          "version": {
            "type": "integer"
          }
        },
        "type": "object"
      },
      "SchemaUpsertRequest": {
        "properties": {
          "allowed_sources": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "allowed_targets": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "attributes": {
            "items": {
              "$ref": "#/components/schemas/Attribute"
            },
            "type": "array"
          },
          "collective": {
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "collective",
          "attributes"
        ],
        "type": "object"
      },
      "SchemaVersion": {
        "properties": {
          "collective": {
            "type": "string"
          },
          "operation": {
            "enum": [
              "created",
              "updated",
              "deleted"
            ],
            "type": "string"
          },
          "recorded_at": {
            "format": "date-time",
            "type": "string"
          },
          "schema": {
            "$ref": "#/components/schemas/Schema"
          },
          "version": {
            "type": "integer"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "in": "header",
        "name": "X-API-Key",
        "type": "apiKey"
      }
    }
  },
  "info": {
    "description": "Contrato HTTP actual de la plataforma IGA.\n\nNotas:\n- Los errores del servicio se devuelven como JSON con los campos `code` y `error`.\n- Los endpoints de listado usan paginación por page y page_size.\n- Cuando `auth.api_key`, `auth.read_api_key`, `auth.write_api_key` o `auth.clients[].api_key` están configurados, las rutas privadas requieren la cabecera `X-API-Key`.\n- Todas las respuestas incluyen la cabecera `X-Request-ID`; los errores JSON también incluyen `request_id`.\n- El namespace canónico actual es `/v1`; las rutas sin prefijo siguen disponibles como alias heredado.\n",
    "title": "IGA Platform API",
    "version": "0.2.0"
  },
  "openapi": "3.0.3",
  "paths": {
    "/access-requests": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/AccessRequesterID"
          },
          {
            "$ref": "#/components/parameters/AccessApplication"
          },
          {
            "$ref": "#/components/parameters/AccessApprover"
          },
          {
            "$ref": "#/components/parameters/AccessStatus"
          },
          {
            "$ref": "#/components/parameters/Collective"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAccessRequestList"
                }
              }
            },
            "description": "Lista paginada de solicitudes de acceso"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Lista solicitudes provisionales de acceso para consumo externo",
        "tags": [
          "Access Requests"
        ]
      }
    },
    "/access-requests/catalog": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/CatalogApplication"
                  },
                  "type": "array"
                }
              }
            },
            "description": "Catálogo de aplicaciones para solicitudes de acceso"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Devuelve el catálogo provisional de aplicaciones y entitlements disponibles",
        "tags": [
          "Access Requests"
        ]
      }
    },
    "/access-requests/summary": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/AccessRequesterID"
          },
          {
            "$ref": "#/components/parameters/AccessApplication"
          },
          {
            "$ref": "#/components/parameters/AccessApprover"
          },
          {
            "$ref": "#/components/parameters/AccessStatus"
          },
          {
            "$ref": "#/components/parameters/Collective"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRequestSummary"
                }
              }
            },
            "description": "Agregados de solicitudes de acceso"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Resume las solicitudes de acceso por estado, aplicación y aprobador",
        "tags": [
          "Access Requests"
        ]
      }
    },
    "/access-requests/{id}": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/IdentityID"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRequestDetail"
                }
              }
            },
            "description": "Solicitud encontrada"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Obtiene una solicitud provisional de acceso",
        "tags": [
          "Access Requests"
        ]
      }
    },
    "/access-requests/{id}/decision": {
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/IdentityID"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccessRequestDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccessRequestDetail"
                }
              }
            },
            "description": "Solicitud actualizada con la decisión registrada"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Registra una decisión provisional sobre una solicitud de acceso",
        "tags": [
          "Access Requests"
        ]
      }
    },
    "/api-clients": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAPIClientList"
                }
              }
            },
            "description": "Lista paginada de clientes API"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Lista clientes API registrados",
        "tags": [
          "API Clients"
        ]
      },
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/APIClientUpsertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIClientCredentialResponse"
                }
              }
            },
            "description": "Cliente API persistido"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Crea o actualiza un cliente API",
        "tags": [
          "API Clients"
        ]
      }
    },
    "/api-clients/{id}": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/IdentityID"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIClient"
                }
              }
            },
            "description": "Cliente API encontrado"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Obtiene un cliente API por id",
        "tags": [
          "API Clients"
        ]
      }
    },
    "/api-clients/{id}/rotate-key": {
      "delete": {
        "parameters": [
          {
            "$ref": "#/components/parameters/IdentityID"
          }
        ],
        "responses": {
          "204": {
            "description": "Cliente API eliminado"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Elimina un cliente API por id",
        "tags": [
          "API Clients"
        ]
      },
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/IdentityID"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIClientCredentialResponse"
                }
              }
            },
            "description": "Credencial rotada correctamente"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Rota la credencial de un cliente API y devuelve la nueva clave una sola vez",
        "tags": [
          "API Clients"
        ]
      }
    },
    "/audit": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/AuditIdentityID"
          },
          {
            "$ref": "#/components/parameters/AuditAction"
          },
          {
            "$ref": "#/components/parameters/AuditFrom"
          },
          {
            "$ref": "#/components/parameters/AuditTo"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAuditEventList"
                }
              }
            },
            "description": "Eventos paginados de auditoría"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Lista eventos de auditoría globales",
        "tags": [
          "Audit"
        ]
      }
    },
    "/guest-portals": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedGuestPortalList"
                }
              }
            },
            "description": "Lista paginada de portales de invitados"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Lista portales de autoservicio para onboarding de invitados externos",
        "tags": [
          "Guest Portals"
        ]
      },
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuestPortalUpsertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuestPortal"
                }
              }
            },
            "description": "Portal persistido"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Crea o actualiza un portal de autoservicio para invitados externos",
        "tags": [
          "Guest Portals"
        ]
      }
    },
    "/guest-portals/{id}": {
      "delete": {
        "parameters": [
          {
            "$ref": "#/components/parameters/IdentityID"
          }
        ],
        "responses": {
          "204": {
            "description": "Portal eliminado"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Elimina un portal de invitados por id",
        "tags": [
          "Guest Portals"
        ]
      },
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/IdentityID"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuestPortal"
                }
              }
            },
            "description": "Portal encontrado"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Obtiene el detalle de un portal de invitados por id",
        "tags": [
          "Guest Portals"
        ]
      }
    },
    "/guest-portals/{slug}/signup": {
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/GuestPortalSlug"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/GuestPortalSignupRequest"
                  },
                  {
                    "$ref": "#/components/schemas/GuestPortalSubmissionRequest"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuestPortalSubmissionResponse"
                }
              }
            },
            "description": "Solicitud aceptada; puede procesarse automáticamente o quedar en revisión manual según la operación del portal"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          },
          "501": {
            "$ref": "#/components/responses/JsonError"
          },
          "502": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "summary": "Mantiene compatibilidad con el alta pública legacy y delega en el flujo declarativo del portal",
        "tags": [
          "Guest Portals"
        ]
      }
    },
    "/guest-portals/{slug}/submissions": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/GuestPortalSlug"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedGuestPortalSubmissionList"
                }
              }
            },
            "description": "Lista paginada de submissions persistidas del portal"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Lista las solicitudes persistidas para un guest portal concreto",
        "tags": [
          "Guest Portals"
        ]
      }
    },
    "/guest-portals/{slug}/submissions/{submissionId}/decision": {
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/GuestPortalSlug"
          },
          {
            "in": "path",
            "name": "submissionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuestPortalSubmissionDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuestPortalSubmissionRecord"
                }
              }
            },
            "description": "Submission actualizada con la decisión persistida"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Registra una decisión operativa sobre una submission en revisión manual",
        "tags": [
          "Guest Portals"
        ]
      }
    },
    "/guest-portals/{slug}/submit": {
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/GuestPortalSlug"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GuestPortalSubmissionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuestPortalSubmissionResponse"
                }
              }
            },
            "description": "Solicitud aceptada; el backend responde con modo de procesamiento automático o revisión manual"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          },
          "501": {
            "$ref": "#/components/responses/JsonError"
          },
          "502": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "summary": "Envía una solicitud pública dinámica para el formulario configurado en el portal",
        "tags": [
          "Guest Portals"
        ]
      }
    },
    "/health": {
      "get": {
        "responses": {
          "200": {
            "description": "Proceso disponible"
          }
        },
        "summary": "Health check del proceso",
        "tags": [
          "Health"
        ]
      }
    },
    "/identities": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/Collective"
          },
          {
            "$ref": "#/components/parameters/Source"
          },
          {
            "$ref": "#/components/parameters/Status"
          },
          {
            "$ref": "#/components/parameters/IncludeProfile"
          },
          {
            "$ref": "#/components/parameters/IncludeSensitive"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedIdentityList"
                }
              }
            },
            "description": "Lista paginada de identidades"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Lista identidades",
        "tags": [
          "Identities"
        ]
      },
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Identity"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                }
              }
            },
            "description": "Identidad persistida"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Crea o actualiza una identidad",
        "tags": [
          "Identities"
        ]
      }
    },
    "/identities/{id}": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/IdentityID"
          },
          {
            "$ref": "#/components/parameters/IncludeProfile"
          },
          {
            "$ref": "#/components/parameters/IncludeSensitive"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Identity"
                    },
                    {
                      "$ref": "#/components/schemas/IdentityWithProfile"
                    }
                  ]
                }
              }
            },
            "description": "Identidad encontrada"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Obtiene una identidad por id",
        "tags": [
          "Identities"
        ]
      }
    },
    "/identities/{id}/audit": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/IdentityID"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedAuditEventList"
                }
              }
            },
            "description": "Eventos paginados de auditoría"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Lista la auditoría de una identidad",
        "tags": [
          "Audit"
        ]
      }
    },
    "/identities/{id}/deactivate": {
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/IdentityID"
          }
        ],
        "responses": {
          "204": {
            "description": "Identidad desactivada"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Desactiva una identidad en el target configurado",
        "tags": [
          "Identities"
        ]
      }
    },
    "/identities/{id}/profile": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/IdentityID"
          },
          {
            "$ref": "#/components/parameters/IncludeSensitive"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Profile"
                }
              }
            },
            "description": "Perfil gobernado"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Obtiene el perfil gobernado de una identidad",
        "tags": [
          "Identities"
        ]
      }
    },
    "/oidc/callback": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "state",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "code",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "error",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "error_description",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Página HTML con el resultado del login OIDC"
          },
          "400": {
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Flujo inválido o expirado"
          },
          "502": {
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Error del intercambio con el IdP"
          }
        },
        "summary": "Callback HTML del login OIDC del portal",
        "tags": [
          "Health"
        ]
      }
    },
    "/oidc/login/start": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OIDCTestStartRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OIDCTestStartResponse"
                }
              }
            },
            "description": "URL de autorización calculada para redirigir al IdP configurado"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "502": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "summary": "Inicia el login OIDC del portal mediante authorization code con PKCE",
        "tags": [
          "Health"
        ]
      }
    },
    "/oidc/providers": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OIDCProvidersResponse"
                }
              }
            },
            "description": "Registro actual de proveedores OIDC gestionados por backend"
          }
        },
        "summary": "Devuelve los proveedores OIDC gestionados por la aplicación y su metadata no sensible",
        "tags": [
          "Health"
        ]
      }
    },
    "/oidc/session": {
      "delete": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OIDCSessionResponse"
                }
              }
            },
            "description": "Sesión eliminada o ausente"
          }
        },
        "summary": "Cierra la sesión OIDC de operador almacenada en cookie",
        "tags": [
          "Health"
        ]
      },
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OIDCSessionResponse"
                }
              }
            },
            "description": "Estado actual de sesión OIDC"
          }
        },
        "summary": "Devuelve el estado actual de la sesión OIDC de operador en el navegador",
        "tags": [
          "Health"
        ]
      }
    },
    "/oidc/test/start": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OIDCTestStartRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OIDCTestStartResponse"
                }
              }
            },
            "description": "URL de autorización calculada para redirigir al IdP configurado"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "502": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "summary": "Alias retrocompatible del inicio de login OIDC del portal mediante authorization code con PKCE",
        "tags": [
          "Health"
        ]
      }
    },
    "/openapi.json": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Documento OpenAPI en JSON"
          }
        },
        "summary": "Devuelve la especificación OpenAPI del servicio en JSON",
        "tags": [
          "Schemas"
        ]
      }
    },
    "/openapi.yaml": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/yaml": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Documento OpenAPI en YAML"
          }
        },
        "summary": "Devuelve la especificación OpenAPI del servicio",
        "tags": [
          "Schemas"
        ]
      }
    },
    "/portal-users": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedPortalUserList"
                }
              }
            },
            "description": "Lista paginada de usuarios del portal"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Lista el inventario visible de usuarios del portal junto con claims y asignaciones gestionadas",
        "tags": [
          "Portal Users"
        ]
      },
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PortalUserUpsertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortalUser"
                }
              }
            },
            "description": "Asignación persistida"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Crea o actualiza una asignación gestionada de grupos baseline para un usuario del portal",
        "tags": [
          "Portal Users"
        ]
      }
    },
    "/portal-users/{id}": {
      "delete": {
        "parameters": [
          {
            "$ref": "#/components/parameters/IdentityID"
          }
        ],
        "responses": {
          "204": {
            "description": "Asignación eliminada"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Elimina la asignación gestionada de un usuario del portal",
        "tags": [
          "Portal Users"
        ]
      }
    },
    "/postman-collection.json": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "Colección Postman v2.1"
          }
        },
        "summary": "Devuelve una colección Postman generada desde el contrato OpenAPI",
        "tags": [
          "Schemas"
        ]
      }
    },
    "/public/guest-portals/{slug}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GuestPortalPublic"
                }
              }
            },
            "description": "Portal público encontrado"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "summary": "Obtiene el detalle público mínimo de un guest portal por slug para renderizar la landing de autoservicio",
        "tags": [
          "Guest Portals"
        ]
      }
    },
    "/ready": {
      "get": {
        "responses": {
          "200": {
            "description": "Dependencias listas"
          },
          "503": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "summary": "Verifica readiness de dependencias configuradas",
        "tags": [
          "Health"
        ]
      }
    },
    "/recertifications": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/AuditIdentityID"
          },
          {
            "$ref": "#/components/parameters/Collective"
          },
          {
            "$ref": "#/components/parameters/Source"
          },
          {
            "$ref": "#/components/parameters/RecertificationApplication"
          },
          {
            "$ref": "#/components/parameters/RecertificationReviewer"
          },
          {
            "$ref": "#/components/parameters/RecertificationRisk"
          },
          {
            "$ref": "#/components/parameters/RecertificationStage"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedRecertificationList"
                }
              }
            },
            "description": "Lista paginada de casos provisionales"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Lista casos provisionales de recertificación para consumo externo",
        "tags": [
          "Recertifications"
        ]
      }
    },
    "/recertifications/summary": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/AuditIdentityID"
          },
          {
            "$ref": "#/components/parameters/Collective"
          },
          {
            "$ref": "#/components/parameters/Source"
          },
          {
            "$ref": "#/components/parameters/RecertificationApplication"
          },
          {
            "$ref": "#/components/parameters/RecertificationReviewer"
          },
          {
            "$ref": "#/components/parameters/RecertificationRisk"
          },
          {
            "$ref": "#/components/parameters/RecertificationStage"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecertificationSummary"
                }
              }
            },
            "description": "Agregados provisionales de recertificación"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Resume los casos provisionales por etapa, aplicación y revisor",
        "tags": [
          "Recertifications"
        ]
      }
    },
    "/recertifications/{id}": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/IdentityID"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecertificationDetail"
                }
              }
            },
            "description": "Caso provisional encontrado"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Obtiene un caso provisional de recertificación",
        "tags": [
          "Recertifications"
        ]
      }
    },
    "/recertifications/{id}/decision": {
      "post": {
        "parameters": [
          {
            "$ref": "#/components/parameters/IdentityID"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecertificationDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecertificationDetail"
                }
              }
            },
            "description": "Caso actualizado con la decisión registrada"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Registra una decisión provisional de recertificación",
        "tags": [
          "Recertifications"
        ]
      }
    },
    "/schemas": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSchemaList"
                }
              }
            },
            "description": "Lista paginada de schemas"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Lista schemas de gobierno",
        "tags": [
          "Schemas"
        ]
      },
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SchemaUpsertRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schema"
                }
              }
            },
            "description": "Schema persistido"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Crea o actualiza un schema",
        "tags": [
          "Schemas"
        ]
      }
    },
    "/schemas/{collective}": {
      "delete": {
        "parameters": [
          {
            "$ref": "#/components/parameters/CollectivePath"
          }
        ],
        "responses": {
          "204": {
            "description": "Schema eliminado"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Elimina el schema de un colectivo",
        "tags": [
          "Schemas"
        ]
      },
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/CollectivePath"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Schema"
                }
              }
            },
            "description": "Schema encontrado"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Obtiene el schema de un colectivo",
        "tags": [
          "Schemas"
        ]
      }
    },
    "/schemas/{collective}/versions": {
      "get": {
        "parameters": [
          {
            "$ref": "#/components/parameters/CollectivePath"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PageSize"
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSchemaVersionList"
                }
              }
            },
            "description": "Historial paginado de snapshots de schema"
          },
          "400": {
            "$ref": "#/components/responses/JsonError"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "404": {
            "$ref": "#/components/responses/JsonError"
          },
          "500": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Lista el historial de versiones de un schema",
        "tags": [
          "Schemas"
        ]
      }
    },
    "/sync": {
      "post": {
        "responses": {
          "202": {
            "description": "Sincronización aceptada"
          },
          "401": {
            "$ref": "#/components/responses/JsonError"
          },
          "403": {
            "$ref": "#/components/responses/JsonError"
          },
          "502": {
            "$ref": "#/components/responses/JsonError"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "Ejecuta la sincronización configurada",
        "tags": [
          "Sync"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "http://localhost:8080/v1"
    },
    {
      "description": "Alias heredado mantenido temporalmente por compatibilidad.",
      "url": "http://localhost:8080"
    }
  ],
  "tags": [
    {
      "name": "Health"
    },
    {
      "name": "Sync"
    },
    {
      "name": "Identities"
    },
    {
      "name": "Audit"
    },
    {
      "name": "Recertifications"
    },
    {
      "name": "Access Requests"
    },
    {
      "name": "API Clients"
    },
    {
      "name": "Portal Users"
    },
    {
      "name": "Guest Portals"
    },
    {
      "name": "Schemas"
    }
  ]
}