openapi.yaml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. openapi: 3.0.3
  2. info:
  3. title: Modgatron
  4. description: |-
  5. API to control the modded animatronic Megatron helmet from Killerbody over the LAN
  6. externalDocs:
  7. description: TODO
  8. url: https://nplusc.de
  9. servers:
  10. - url: https://petstore3.swagger.io/api/v3
  11. paths:
  12. /raw:
  13. post:
  14. summary: raw command posting
  15. description: Debug command, don't bother to poke at it
  16. operationId: flyswatter
  17. requestBody:
  18. description: raw cmd
  19. content:
  20. application/json:
  21. schema:
  22. $ref: '#/components/schemas/RawCmd'
  23. application/xml:
  24. schema:
  25. $ref: '#/components/schemas/RawCmd'
  26. application/x-www-form-urlencoded:
  27. schema:
  28. $ref: '#/components/schemas/RawCmd'
  29. required: true
  30. responses:
  31. '200':
  32. description: Successful operation
  33. '400':
  34. description: from \_\_future\_\_ import braces
  35. /movement:
  36. post:
  37. summary: Trigger the animatronic parts
  38. description: Triggers the animatronics
  39. operationId: wiggle
  40. requestBody:
  41. description: raw cmd
  42. content:
  43. application/json:
  44. schema:
  45. $ref: '#/components/schemas/Movement'
  46. application/xml:
  47. schema:
  48. $ref: '#/components/schemas/Movement'
  49. application/x-www-form-urlencoded:
  50. schema:
  51. $ref: '#/components/schemas/Movement'
  52. required: true
  53. responses:
  54. '200':
  55. description: Successful operation
  56. '400':
  57. description: Bad data, operation not allowed
  58. ############
  59. /onboardAudio:
  60. post:
  61. summary: trigger default audio fragment
  62. description: "plays one of the default audio fragments, WARNING: EXTREMELY LOUD"
  63. operationId: onboard
  64. requestBody:
  65. description: raw cmd
  66. content:
  67. application/json:
  68. schema:
  69. $ref: '#/components/schemas/onboardAudio'
  70. application/xml:
  71. schema:
  72. $ref: '#/components/schemas/onboardAudio'
  73. application/x-www-form-urlencoded:
  74. schema:
  75. $ref: '#/components/schemas/onboardAudio'
  76. required: true
  77. responses:
  78. '200':
  79. description: Successful operation
  80. '400':
  81. description: Bad data, operation not allowed
  82. ############
  83. /customAudio:
  84. post:
  85. summary: Triggers custom preloaded audio fragment
  86. description: Plays one of the custom preloaded audio fragments
  87. operationId: custom
  88. requestBody:
  89. description: raw cmd
  90. content:
  91. application/json:
  92. schema:
  93. $ref: '#/components/schemas/customAudio'
  94. application/xml:
  95. schema:
  96. $ref: '#/components/schemas/customAudio'
  97. application/x-www-form-urlencoded:
  98. schema:
  99. $ref: '#/components/schemas/customAudio'
  100. required: true
  101. responses:
  102. '200':
  103. description: Successful operation
  104. '400':
  105. description: Bad data, operation not allowed
  106. ############
  107. /setVolume:
  108. post:
  109. summary: set volume level
  110. description: set volume level from 0 (off) to 8
  111. operationId: volume
  112. requestBody:
  113. description: raw cmd
  114. content:
  115. application/json:
  116. schema:
  117. $ref: '#/components/schemas/VolumeLevel'
  118. application/xml:
  119. schema:
  120. $ref: '#/components/schemas/VolumeLevel'
  121. application/x-www-form-urlencoded:
  122. schema:
  123. $ref: '#/components/schemas/VolumeLevel'
  124. required: true
  125. responses:
  126. '200':
  127. description: Successful operation
  128. '400':
  129. description: Bad data, operation not allowed
  130. /dynamicAudio:
  131. post:
  132. summary: sends a audiofile to be played
  133. description: sends a audio file which is converted and streamed over
  134. operationId: stream
  135. requestBody:
  136. description: file to wiggle
  137. content:
  138. application/octet-stream:
  139. schema:
  140. type: string
  141. format: binary
  142. required: true
  143. responses:
  144. '200':
  145. description: Successful operation
  146. '400':
  147. description: Bad data, operation not allowed
  148. ############
  149. /wiggleMouth:
  150. post:
  151. summary: Toggles the mouth wiggling
  152. description: Toggles the mouth wiggling
  153. operationId: bite
  154. responses:
  155. '200':
  156. description: Successful operation
  157. components:
  158. schemas:
  159. VolumeLevel:
  160. type: integer
  161. format: int32
  162. example: 8
  163. RawCmd:
  164. type: object
  165. properties:
  166. sequence:
  167. type: string
  168. psk:
  169. type: string
  170. description: authentication for this command, forget it......
  171. customAudio:
  172. type: object
  173. properties:
  174. sample:
  175. type: string
  176. description: modded audio snippets
  177. enum:
  178. - rogerroger
  179. - r2d2-beepery
  180. - jfo-_sfx_machinepowerup
  181. - jfo-authenticated
  182. - jfo-charged-and-ready
  183. - jfo-core-programming-modified
  184. - jfo-recalibrating
  185. - jfo-scanning
  186. - jfo-system_rebooted
  187. - jfo-system-malfunction
  188. - r2d2-demotivated
  189. - gb-startup-sound
  190. - worms_bittekommengrosservogel
  191. - glados_ohdubistes
  192. - glados-nicht-reinfallen
  193. - glados-planb
  194. - glados-seid-ihr-defekt
  195. - hallelujah
  196. - p2turret-fail
  197. - worms_oede
  198. - optimusprime
  199. wiggle_mouth:
  200. type: boolean
  201. xml:
  202. name: custom
  203. onboardAudio:
  204. type: string
  205. description: original audio samples, WARNING EXTREMELY LOUD
  206. enum:
  207. - decepticonsretreat
  208. - allhailmegatron
  209. - bzzzzzzzrt
  210. - decepticonsattack
  211. - snd_eyelight_on
  212. - snd_eyelight_off
  213. - snd_bootup
  214. xml:
  215. name: onboard
  216. Movement:
  217. type: string
  218. description: trigger moveable part
  219. enum:
  220. - eyeglow
  221. - eyedark
  222. - eyeflickering
  223. - earwiggle
  224. - battlemodeon
  225. - battlemodeoff
  226. xml:
  227. name: movement
  228. ApiResponse:
  229. type: object
  230. properties:
  231. code:
  232. type: integer
  233. format: int32
  234. type:
  235. type: string
  236. message:
  237. type: string
  238. xml:
  239. name: '##default'