embedded_spec.go 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. // Code generated by go-swagger; DO NOT EDIT.
  2. package restapi
  3. // This file was generated by the swagger tool.
  4. // Editing this file might prove futile when you re-run the swagger generate command
  5. import (
  6. "encoding/json"
  7. )
  8. var (
  9. // SwaggerJSON embedded version of the swagger document used at generation time
  10. SwaggerJSON json.RawMessage
  11. // FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
  12. FlatSwaggerJSON json.RawMessage
  13. )
  14. func init() {
  15. SwaggerJSON = json.RawMessage([]byte(`{
  16. "consumes": [
  17. "application/eu.reverservices.gem.spaas.v1+json"
  18. ],
  19. "produces": [
  20. "application/eu.reverservices.gem.spaas.v1+json"
  21. ],
  22. "schemes": [
  23. "http"
  24. ],
  25. "swagger": "2.0",
  26. "info": {
  27. "description": "This API exposes an algorithm that computes optimal power production allocation for a given power need and power plant capacity.",
  28. "title": "Optimal power production allocation service",
  29. "version": "0.0.1"
  30. },
  31. "paths": {
  32. "/productionplan": {
  33. "post": {
  34. "description": "Compute the optimal production plan for given load and capacity.\n",
  35. "consumes": [
  36. "application/json"
  37. ],
  38. "produces": [
  39. "application/json"
  40. ],
  41. "summary": "compute production plan",
  42. "operationId": "ProductionPlan",
  43. "parameters": [
  44. {
  45. "name": "payload format",
  46. "in": "body",
  47. "schema": {
  48. "$ref": "#/definitions/payload"
  49. }
  50. }
  51. ],
  52. "responses": {
  53. "200": {
  54. "description": "returns optimal production plan",
  55. "schema": {
  56. "type": "array",
  57. "items": {
  58. "type": "object"
  59. }
  60. }
  61. },
  62. "default": {
  63. "description": "generic error response",
  64. "schema": {
  65. "$ref": "#/definitions/error"
  66. }
  67. }
  68. }
  69. }
  70. }
  71. },
  72. "definitions": {
  73. "error": {
  74. "type": "object",
  75. "required": [
  76. "message"
  77. ],
  78. "properties": {
  79. "code": {
  80. "type": "integer",
  81. "format": "int64"
  82. },
  83. "message": {
  84. "type": "string"
  85. }
  86. }
  87. },
  88. "payload": {
  89. "type": "object",
  90. "required": [
  91. "load",
  92. "fuels",
  93. "powerplants"
  94. ],
  95. "properties": {
  96. "fuels": {
  97. "type": "object"
  98. },
  99. "load": {
  100. "type": "number",
  101. "format": "float64"
  102. },
  103. "powerplants": {
  104. "type": "array",
  105. "items": {
  106. "$ref": "#/definitions/powerplant"
  107. }
  108. }
  109. }
  110. },
  111. "powerplant": {
  112. "type": "object",
  113. "required": [
  114. "name",
  115. "type",
  116. "efficiency",
  117. "pmin",
  118. "pmax"
  119. ],
  120. "properties": {
  121. "efficiency": {
  122. "type": "number",
  123. "format": "float64"
  124. },
  125. "name": {
  126. "type": "string"
  127. },
  128. "pmax": {
  129. "type": "number",
  130. "format": "float64"
  131. },
  132. "pmin": {
  133. "type": "number",
  134. "format": "float64"
  135. },
  136. "type": {
  137. "type": "string"
  138. }
  139. }
  140. }
  141. }
  142. }`))
  143. FlatSwaggerJSON = json.RawMessage([]byte(`{
  144. "consumes": [
  145. "application/eu.reverservices.gem.spaas.v1+json"
  146. ],
  147. "produces": [
  148. "application/eu.reverservices.gem.spaas.v1+json"
  149. ],
  150. "schemes": [
  151. "http"
  152. ],
  153. "swagger": "2.0",
  154. "info": {
  155. "description": "This API exposes an algorithm that computes optimal power production allocation for a given power need and power plant capacity.",
  156. "title": "Optimal power production allocation service",
  157. "version": "0.0.1"
  158. },
  159. "paths": {
  160. "/productionplan": {
  161. "post": {
  162. "description": "Compute the optimal production plan for given load and capacity.\n",
  163. "consumes": [
  164. "application/json"
  165. ],
  166. "produces": [
  167. "application/json"
  168. ],
  169. "summary": "compute production plan",
  170. "operationId": "ProductionPlan",
  171. "parameters": [
  172. {
  173. "name": "payload format",
  174. "in": "body",
  175. "schema": {
  176. "$ref": "#/definitions/payload"
  177. }
  178. }
  179. ],
  180. "responses": {
  181. "200": {
  182. "description": "returns optimal production plan",
  183. "schema": {
  184. "type": "array",
  185. "items": {
  186. "type": "object"
  187. }
  188. }
  189. },
  190. "default": {
  191. "description": "generic error response",
  192. "schema": {
  193. "$ref": "#/definitions/error"
  194. }
  195. }
  196. }
  197. }
  198. }
  199. },
  200. "definitions": {
  201. "error": {
  202. "type": "object",
  203. "required": [
  204. "message"
  205. ],
  206. "properties": {
  207. "code": {
  208. "type": "integer",
  209. "format": "int64"
  210. },
  211. "message": {
  212. "type": "string"
  213. }
  214. }
  215. },
  216. "payload": {
  217. "type": "object",
  218. "required": [
  219. "load",
  220. "fuels",
  221. "powerplants"
  222. ],
  223. "properties": {
  224. "fuels": {
  225. "type": "object"
  226. },
  227. "load": {
  228. "type": "number",
  229. "format": "float64"
  230. },
  231. "powerplants": {
  232. "type": "array",
  233. "items": {
  234. "$ref": "#/definitions/powerplant"
  235. }
  236. }
  237. }
  238. },
  239. "powerplant": {
  240. "type": "object",
  241. "required": [
  242. "name",
  243. "type",
  244. "efficiency",
  245. "pmin",
  246. "pmax"
  247. ],
  248. "properties": {
  249. "efficiency": {
  250. "type": "number",
  251. "format": "float64"
  252. },
  253. "name": {
  254. "type": "string"
  255. },
  256. "pmax": {
  257. "type": "number",
  258. "format": "float64"
  259. },
  260. "pmin": {
  261. "type": "number",
  262. "format": "float64"
  263. },
  264. "type": {
  265. "type": "string"
  266. }
  267. }
  268. }
  269. }
  270. }`))
  271. }