{ "openapi": "3.0.1", "info": { "title": "Api", "version": "1.0" }, "paths": { "/crear-producto": { "post": { "tags": [ "Api" ], "operationId": "CrearProducto", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Productos" } } }, "required": true }, "responses": { "200": { "description": "OK" } } } }, "/traer-productos": { "get": { "tags": [ "Api" ], "operationId": "TraerProductos", "responses": { "200": { "description": "OK" } } } }, "/traer-producto/{id}": { "get": { "tags": [ "Api" ], "operationId": "TraerProducto", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } }, "/actualizar-producto/{id}": { "post": { "tags": [ "Api" ], "operationId": "ActualizarProducto", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Productos" } } }, "required": true }, "responses": { "200": { "description": "OK" } } } }, "/eliminar-producto/{id}": { "delete": { "tags": [ "Api" ], "operationId": "EliminarProducto", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "integer", "format": "int32" } } ], "responses": { "200": { "description": "OK" } } } } }, "components": { "schemas": { "Productos": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "nombre": { "type": "string", "nullable": true }, "precio": { "type": "number", "format": "double" }, "stock": { "type": "integer", "format": "int32" } }, "additionalProperties": false } } } }