printservice.json 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. {
  2. "openapi": "3.0.1",
  3. "info": {
  4. "title": "printservice",
  5. "version": "1.0"
  6. },
  7. "paths": {
  8. "/api/printer/list": {
  9. "get": {
  10. "tags": [
  11. "Printer"
  12. ],
  13. "responses": {
  14. "200": {
  15. "description": "OK"
  16. }
  17. }
  18. }
  19. },
  20. "/api/printer/get-local-ip": {
  21. "get": {
  22. "tags": [
  23. "Printer"
  24. ],
  25. "responses": {
  26. "200": {
  27. "description": "OK"
  28. }
  29. }
  30. }
  31. },
  32. "/api/printer/open-drawer": {
  33. "post": {
  34. "tags": [
  35. "Printer"
  36. ],
  37. "requestBody": {
  38. "content": {
  39. "application/json": {
  40. "schema": {
  41. "type": "string"
  42. }
  43. },
  44. "text/json": {
  45. "schema": {
  46. "type": "string"
  47. }
  48. },
  49. "application/*+json": {
  50. "schema": {
  51. "type": "string"
  52. }
  53. }
  54. }
  55. },
  56. "responses": {
  57. "200": {
  58. "description": "OK"
  59. }
  60. }
  61. }
  62. },
  63. "/api/printer/print-text": {
  64. "post": {
  65. "tags": [
  66. "Printer"
  67. ],
  68. "requestBody": {
  69. "content": {
  70. "application/json": {
  71. "schema": {
  72. "$ref": "#/components/schemas/PrintTextRequest"
  73. }
  74. },
  75. "text/json": {
  76. "schema": {
  77. "$ref": "#/components/schemas/PrintTextRequest"
  78. }
  79. },
  80. "application/*+json": {
  81. "schema": {
  82. "$ref": "#/components/schemas/PrintTextRequest"
  83. }
  84. }
  85. }
  86. },
  87. "responses": {
  88. "200": {
  89. "description": "OK"
  90. }
  91. }
  92. }
  93. },
  94. "/api/printer/print-ticket": {
  95. "post": {
  96. "tags": [
  97. "Printer"
  98. ],
  99. "requestBody": {
  100. "content": {
  101. "multipart/form-data": {
  102. "schema": {
  103. "type": "object",
  104. "properties": {
  105. "file": {
  106. "type": "string",
  107. "format": "binary"
  108. },
  109. "printerName": {
  110. "type": "string"
  111. }
  112. }
  113. },
  114. "encoding": {
  115. "file": {
  116. "style": "form"
  117. },
  118. "printerName": {
  119. "style": "form"
  120. }
  121. }
  122. }
  123. }
  124. },
  125. "responses": {
  126. "200": {
  127. "description": "OK"
  128. }
  129. }
  130. }
  131. },
  132. "/api/printer/cut-paper": {
  133. "post": {
  134. "tags": [
  135. "Printer"
  136. ],
  137. "requestBody": {
  138. "content": {
  139. "application/json": {
  140. "schema": {
  141. "type": "string"
  142. }
  143. },
  144. "text/json": {
  145. "schema": {
  146. "type": "string"
  147. }
  148. },
  149. "application/*+json": {
  150. "schema": {
  151. "type": "string"
  152. }
  153. }
  154. }
  155. },
  156. "responses": {
  157. "200": {
  158. "description": "OK"
  159. }
  160. }
  161. }
  162. }
  163. },
  164. "components": {
  165. "schemas": {
  166. "PrintTextRequest": {
  167. "type": "object",
  168. "properties": {
  169. "printerIp": {
  170. "type": "string",
  171. "nullable": true
  172. },
  173. "text": {
  174. "type": "string",
  175. "nullable": true
  176. }
  177. },
  178. "additionalProperties": false
  179. }
  180. }
  181. }
  182. }