388 lines
14 KiB
JSON
388 lines
14 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"title": "El Colef RAP API",
|
|
"version": "1.0.1"
|
|
},
|
|
"paths": {
|
|
"/api/login_interno": {
|
|
"post": {
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "Autenticación de usuarios internos",
|
|
"operationId": "0a610ae5c7296b157a79b6d3536df957",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"required": [
|
|
"email",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "usuario"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"example": "******"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Login correcto",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Login correcto"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Credenciales incorrectas",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Credenciales incorrectas"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/login_alumno": {
|
|
"post": {
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "Autenticación de alumnos",
|
|
"operationId": "f24d785085b6589e8d3a2b013d3cc54b",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"required": [
|
|
"email",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "usuario"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"example": "******"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Login correcto",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Login correcto"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Credenciales incorrectas",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Credenciales incorrectas"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/login_externo": {
|
|
"post": {
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "Autenticación de usuarios externos",
|
|
"operationId": "c4371e5c83bb5814a941e96fc599a0f2",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"required": [
|
|
"email",
|
|
"password"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"example": "usuario"
|
|
},
|
|
"password": {
|
|
"type": "string",
|
|
"example": "******"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Login correcto",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Login correcto"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Credenciales incorrectas",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Credenciales incorrectas"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/logout-sipa": {
|
|
"post": {
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "Cerrar sesión e invalidar token",
|
|
"operationId": "59a82d84648bf10ff9216a93d2367558",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Sesión cerrada",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"example": "Sesión cerrada correctamente"
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Token inválido o no enviado"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/refresh-sipa": {
|
|
"post": {
|
|
"tags": [
|
|
"Auth"
|
|
],
|
|
"summary": "Renovar token",
|
|
"operationId": "187f695fb11d67a934406bceb0e6b0c5",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Token renovado",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"access_token": {
|
|
"type": "string",
|
|
"example": "nuevo_token..."
|
|
},
|
|
"token_type": {
|
|
"type": "string",
|
|
"example": "Bearer"
|
|
},
|
|
"expires_in": {
|
|
"type": "integer",
|
|
"example": 7200
|
|
}
|
|
},
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Token inválido o expirado"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/instituciones": {
|
|
"get": {
|
|
"tags": [
|
|
"Instituciones"
|
|
],
|
|
"summary": "Lista de instituciones del usuario autenticado",
|
|
"description": "Display a listing of the resource.",
|
|
"operationId": "ea1f64b7a6382ab948b1e9a93df4dc47",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "No autorizado",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {},
|
|
"example": {
|
|
"message": "Unauthenticated."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/alumnos": {
|
|
"get": {
|
|
"tags": [
|
|
"Alumnos"
|
|
],
|
|
"summary": "Lista de Alumnos",
|
|
"description": "Display a listing of the resource.",
|
|
"operationId": "346dc73ef720eb800787271da07ab404",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "No autorizado",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {},
|
|
"example": {
|
|
"message": "Unauthenticated."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"securitySchemes": {
|
|
"bearerAuth": {
|
|
"type": "http",
|
|
"bearerFormat": "JWT",
|
|
"scheme": "bearer"
|
|
}
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"tags": [
|
|
{
|
|
"name": "Auth",
|
|
"description": "Autenticación de usuarios"
|
|
},
|
|
{
|
|
"name": "Instituciones",
|
|
"description": "Gestión de instituciones"
|
|
},
|
|
{
|
|
"name": "Alumnos",
|
|
"description": "Gestión de Alumnos"
|
|
}
|
|
]
|
|
} |