{ "openapi": "3.0.0", "info": { "title": "API RESTful (Solo método GET)", "version": "1.0.0", "description": "API RESTful de Tejelanas Vivi para la consulta de productos artesanales, servicios disponibles, información del proyecto y preguntas frecuentes, mediante endpoints seguros que utilizan autenticación Bearer JWT." }, "servers": [ { "url": "https://www.clinicatecnologica.cl/ipss/tejelanasVivi/api/v1", "description": "Endpoint base de la API pública de Tejelanas Vivi" } ], "security": [ { "bearerAuth": [] } ], "paths": { "/products-services/": { "get": { "summary": "Obtiene la lista completa de productos y servicios de Tejelanas Vivi.", "description": "Retorna un array de los productos y servicios disponibles.", "responses": { "200": { "description": "Consulta realizada con éxito. Retorna un objeto con dos arrays: 'productos' y 'servicios', cada uno con sus respectivos detalles como nombre, precio, imágenes y más.", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" }, "Cache-Control": { "$ref": "#/components/headers/Cache-Control" }, "ETag": { "$ref": "#/components/headers/ETag" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "productos": { "type": "array", "items": { "$ref": "#/components/schemas/Producto" } }, "servicios": { "type": "array", "items": { "$ref": "#/components/schemas/Servicio" } } } } } } } } }, "500": { "description": "Error interno del servidor. Esto puede deberse a fallos en el sistema, problemas de red o errores inesperados.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "mensaje": "Error interno del servidor. Por favor, intente nuevamente o más tarde." } } } } } } }, "/about-us/": { "get": { "summary": "Obtiene la descripción del proyecto de Tejelanas Vivi.", "description": "Retorna un array de la descripción del proyecto.", "responses": { "200": { "description": "Consulta realizada con éxito. Devuelve un objeto con una cadena que describe el propósito y la visión del proyecto Tejelanas Vivi.", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" }, "Cache-Control": { "$ref": "#/components/headers/Cache-Control" }, "ETag": { "$ref": "#/components/headers/ETag" } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AboutUs" } } } }, "500": { "description": "Error interno del servidor. Esto puede deberse a fallos en el sistema, problemas de red o errores inesperados.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "mensaje": "Error al conectar con la base de datos." } } } } } } }, "/faq/": { "get": { "summary": "Obtiene las preguntas frecuentes de Tejelanas Vivi.", "description": "Retorna un array de las preguntas frecuentes (FAQs).", "responses": { "200": { "description": "Consulta realizada con éxito. Devuelve un array de objetos, cada uno con una pregunta frecuente, su respuesta correspondiente y un indicador de visibilidad.", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" }, "X-RateLimit-Remaining": { "$ref": "#/components/headers/X-RateLimit-Remaining" }, "X-RateLimit-Reset": { "$ref": "#/components/headers/X-RateLimit-Reset" }, "Cache-Control": { "$ref": "#/components/headers/Cache-Control" }, "ETag": { "$ref": "#/components/headers/ETag" } }, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/FAQ" } } } } } } }, "500": { "description": "Error interno del servidor. Esto puede deberse a fallos en el sistema, problemas de red o errores inesperados.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" }, "example": { "mensaje": "Error al conectar con la base de datos." } } } } } } } }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Autenticación mediante token JWT. Incluye el token en el encabezado 'Authorization' como: Bearer {token}" } }, "headers": { "X-RateLimit-Limit": { "description": "El límite de peticiones por hora.", "schema": { "type": "integer" }, "example": 100 }, "X-RateLimit-Remaining": { "description": "Número de peticiones restantes en la hora actual.", "schema": { "type": "integer" }, "example": 95 }, "X-RateLimit-Reset": { "description": "Timestamp Unix cuando el límite se reinicia.", "schema": { "type": "integer" }, "example": 1653571200 }, "Cache-Control": { "description": "Directivas de control de caché.", "schema": { "type": "string" }, "example": "public, max-age=3600" }, "ETag": { "description": "Etiqueta para validación de caché.", "schema": { "type": "string" }, "example": "W/\"abcdef12345\"" } }, "schemas": { "Producto": { "type": "object", "properties": { "id": { "type": "integer" }, "nombre": { "type": "string" }, "descripcion": { "type": "string" }, "tallas": { "type": "array", "items": { "type": "string" } }, "colores": { "type": "array", "items": { "type": "string" } }, "precio": { "type": "number" }, "imgs": { "type": "array", "items": { "type": "string", "format": "uri" } } }, "required": ["id", "nombre", "descripcion", "precio"], "example": { "id": 1, "nombre": "Polera deportiva de invierno", "descripcion": "Un polera de material termico ideal para practicar deporte en el invierno.", "tallas": ["S", "M", "L"], "colores": ["rojo", "negro"], "precio": 7200, "imgs": ["https://ejemplo.com/imgs/productos/gorroInvierno1.png"] } }, "Servicio": { "type": "object", "properties": { "id": { "type": "integer" }, "nombre": { "type": "string" }, "ubicacion": { "type": "string" }, "cupos": { "type": "integer" }, "fecha": { "type": "string" }, "imgs": { "type": "array", "items": { "type": "string", "format": "uri" } } }, "required": ["id", "nombre", "ubicacion", "cupos", "fecha"], "example": { "id": 1, "nombre": "Curso Intensivo de futbol", "ubicacion": "cancha 3 - Centro de entrenamiento San Benito", "cupos": 30, "fecha": "07/06/2025", "imgs": ["https://ejemplo.com/imgs/servicios/cursoCrochet1.png"] } }, "AboutUs": { "type": "object", "properties": { "data": { "type": "string", "description": "Descripción del proyecto de Tejelanas Vivi." } }, "required": ["data"], "example": { "data": "Raíces Creativas es un proyecto que combina tradición y tecnología para dar vida a productos con historia. Nos inspiramos en las costumbres de distintas culturas y las reinterpretamos en diseños modernos, accesibles y funcionales. Nuestro enfoque está en crear valor social y ambiental a través del trabajo colaborativo y el uso responsable de los recursos." } }, "FAQ": { "type": "object", "properties": { "id": { "type": "integer" }, "titulo": { "type": "string" }, "respuesta": { "type": "string" }, "activo": { "type": "boolean" } }, "required": ["id", "titulo", "respuesta", "activo"], "example": { "id": 1, "titulo": "¿Puedo cambiar el idioma de la aplicación?", "respuesta": "Sí, en la sección de configuración puedes seleccionar el idioma preferido.", "activo": "true" } }, "Error": { "type": "object", "properties": { "mensaje": { "type": "string", "description": "Mensaje de error." } }, "required": ["mensaje"] } } } }