{ "openapi": "3.0.1", "info": { "title": "printservice", "version": "1.0" }, "paths": { "/api/printer/list": { "get": { "tags": [ "Printer" ], "responses": { "200": { "description": "OK" } } } }, "/api/printer/get-local-ip": { "get": { "tags": [ "Printer" ], "responses": { "200": { "description": "OK" } } } }, "/api/printer/open-drawer": { "post": { "tags": [ "Printer" ], "requestBody": { "content": { "application/json": { "schema": { "type": "string" } }, "text/json": { "schema": { "type": "string" } }, "application/*+json": { "schema": { "type": "string" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/printer/print-text": { "post": { "tags": [ "Printer" ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PrintTextRequest" } }, "text/json": { "schema": { "$ref": "#/components/schemas/PrintTextRequest" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/PrintTextRequest" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/printer/print-ticket": { "post": { "tags": [ "Printer" ], "requestBody": { "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary" }, "printerName": { "type": "string" } } }, "encoding": { "file": { "style": "form" }, "printerName": { "style": "form" } } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/printer/cut-paper": { "post": { "tags": [ "Printer" ], "requestBody": { "content": { "application/json": { "schema": { "type": "string" } }, "text/json": { "schema": { "type": "string" } }, "application/*+json": { "schema": { "type": "string" } } } }, "responses": { "200": { "description": "OK" } } } } }, "components": { "schemas": { "PrintTextRequest": { "type": "object", "properties": { "printerIp": { "type": "string", "nullable": true }, "text": { "type": "string", "nullable": true } }, "additionalProperties": false } } } }