{ "openapi": "3.0.1", "info": { "title": "API de Personas", "description": "API para gestionar personas", "version": "v1" }, "paths": { "/api/Persona/GetPersonas": { "get": { "tags": [ "Persona" ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Persona" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Persona" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Persona" } } } } } } } }, "/api/Persona/GetPersona/{id}": { "get": { "tags": [ "Persona" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/Persona" } }, "application/json": { "schema": { "$ref": "#/components/schemas/Persona" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Persona" } } } } } } }, "/api/Persona/CreatePersona": { "post": { "tags": [ "Persona" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Persona" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Persona" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/Persona" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Persona/UpdatePersona/{id}": { "put": { "tags": [ "Persona" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Persona" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Persona" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/Persona" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Persona/DeletePersona/{id}": { "delete": { "tags": [ "Persona" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/Puesto/GetPuestos": { "get": { "tags": [ "Puesto" ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Puesto" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Puesto" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Puesto" } } } } } } } }, "/api/Puesto/GetPuesto/{id}": { "get": { "tags": [ "Puesto" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/Puesto" } }, "application/json": { "schema": { "$ref": "#/components/schemas/Puesto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Puesto" } } } } } } }, "/api/Puesto/CreatePuesto": { "post": { "tags": [ "Puesto" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Puesto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Puesto" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/Puesto" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Puesto/UpdatePuesto/{id}": { "put": { "tags": [ "Puesto" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Puesto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Puesto" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/Puesto" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Puesto/DeletePuesto/{id}": { "delete": { "tags": [ "Puesto" ], "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } } }, "components": { "schemas": { "Persona": { "type": "object", "properties": { "idPersona": { "type": "integer", "format": "int32" }, "nombre": { "type": "string", "nullable": true }, "edad": { "type": "number", "format": "double" }, "telefono": { "type": "number", "format": "double" }, "fechaNacimiento": { "type": "string", "format": "date-time" }, "sexo": { "type": "string", "nullable": true }, "activo": { "type": "boolean" }, "idPuesto": { "type": "integer", "format": "int32" }, "puesto": { "$ref": "#/components/schemas/Puesto" } }, "additionalProperties": false }, "Puesto": { "type": "object", "properties": { "idPuesto": { "type": "integer", "format": "int32" }, "descripcionPuesto": { "type": "string", "nullable": true } }, "additionalProperties": false } } } }