Last active
May 3, 2025 01:33
-
-
Save Java2303/aa1e72f634cca87c69418ecc118a32b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.1.0 | |
info: | |
title: D&D Game Plugin API | |
version: "1.0.0" | |
description: API para gestionar datos de campañas de D&D. | |
servers: | |
- url: https://dnd-plugin-basic.onrender.com | |
paths: | |
/store_character: | |
post: | |
summary: Guarda un personaje. | |
operationId: storeCharacter | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
name: | |
type: string | |
description: Nombre del personaje. | |
example: "Aragorn" | |
type: | |
type: string | |
description: Tipo del personaje (e.g., héroe, villano). | |
example: "héroe" | |
attributes: | |
type: object | |
description: Atributos del personaje en formato clave-valor. | |
additionalProperties: | |
type: integer | |
example: | |
fuerza: 18 | |
destreza: 14 | |
inteligencia: 12 | |
skills: | |
type: array | |
description: Habilidades del personaje como una lista. | |
items: | |
type: string | |
example: ["Espadachín", "Montar"] | |
description: | |
type: string | |
description: Descripción del personaje. | |
example: "Un valiente guerrero con habilidades de liderazgo excepcionales." | |
responses: | |
"201": | |
description: Personaje guardado con éxito. | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
message: | |
type: string | |
example: "Character stored successfully." | |
"400": | |
description: Solicitud inválida. | |
"500": | |
description: Error interno del servidor. | |
/retrieve_characters: | |
get: | |
summary: Recupera todos los personajes. | |
operationId: retrieveCharacters | |
responses: | |
"200": | |
description: Lista de personajes. | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
characters: | |
type: array | |
items: | |
type: object | |
properties: | |
id: | |
type: integer | |
example: 1 | |
name: | |
type: string | |
example: "Aragorn" | |
type: | |
type: string | |
example: "héroe" | |
attributes: | |
type: object | |
description: Atributos en formato clave-valor. | |
additionalProperties: | |
type: integer | |
example: | |
fuerza: 18 | |
destreza: 14 | |
inteligencia: 12 | |
skills: | |
type: array | |
items: | |
type: string | |
example: ["Espadachín", "Montar"] | |
description: | |
type: string | |
example: "Un valiente guerrero con habilidades de liderazgo excepcionales." | |
"500": | |
description: Error interno del servidor. | |
/store_{entity}: | |
post: | |
summary: Guarda un elemento en la tabla especificada. | |
operationId: storeEntity | |
parameters: | |
- name: entity | |
in: path | |
required: true | |
schema: | |
type: string | |
enum: [lore, villains, npcs, locations, factions, romances] | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
name: | |
type: string | |
description: Nombre del elemento. | |
other_fields: | |
type: object | |
description: Otros campos específicos del elemento. | |
additionalProperties: | |
type: string | |
responses: | |
"201": | |
description: Elemento guardado con éxito. | |
"400": | |
description: Solicitud inválida. | |
"500": | |
description: Error interno del servidor. | |
/retrieve_{entity}: | |
get: | |
summary: Recupera todos los elementos de la tabla especificada. | |
operationId: retrieveEntity | |
parameters: | |
- name: entity | |
in: path | |
required: true | |
schema: | |
type: string | |
enum: [lore, villains, npcs, locations, factions, romances] | |
responses: | |
"200": | |
description: Lista de elementos. | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
items: | |
type: array | |
items: | |
type: object | |
properties: | |
id: | |
type: integer | |
example: 1 | |
name: | |
type: string | |
example: "Mordor" | |
details: | |
type: string | |
example: "Un lugar oscuro y peligroso." | |
"500": | |
description: Error interno del servidor. | |
/download_db: | |
get: | |
summary: Descarga la base de datos completa. | |
operationId: downloadDatabase | |
responses: | |
"200": | |
description: Archivo de la base de datos descargado con éxito. | |
content: | |
application/octet-stream: | |
schema: | |
type: string | |
format: binary | |
"500": | |
description: Error interno del servidor. | |
/: | |
get: | |
summary: Verifica el estado del servidor. | |
operationId: home | |
responses: | |
"200": | |
description: Mensaje de bienvenida. | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
message: | |
type: string | |
example: "Welcome to the D&D Plugin API!" | |
"500": | |
description: Error interno del servidor. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment