embedded_spec.go 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  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. "type": "object"
  107. }
  108. }
  109. }
  110. }
  111. }
  112. }`))
  113. FlatSwaggerJSON = json.RawMessage([]byte(`{
  114. "consumes": [
  115. "application/eu.reverservices.gem.spaas.v1+json"
  116. ],
  117. "produces": [
  118. "application/eu.reverservices.gem.spaas.v1+json"
  119. ],
  120. "schemes": [
  121. "http"
  122. ],
  123. "swagger": "2.0",
  124. "info": {
  125. "description": "This API exposes an algorithm that computes optimal power production allocation for a given power need and power plant capacity.",
  126. "title": "Optimal power production allocation service",
  127. "version": "0.0.1"
  128. },
  129. "paths": {
  130. "/productionplan": {
  131. "post": {
  132. "description": "Compute the optimal production plan for given load and capacity.\n",
  133. "consumes": [
  134. "application/json"
  135. ],
  136. "produces": [
  137. "application/json"
  138. ],
  139. "summary": "compute production plan",
  140. "operationId": "ProductionPlan",
  141. "parameters": [
  142. {
  143. "name": "payload format",
  144. "in": "body",
  145. "schema": {
  146. "$ref": "#/definitions/payload"
  147. }
  148. }
  149. ],
  150. "responses": {
  151. "200": {
  152. "description": "returns optimal production plan",
  153. "schema": {
  154. "type": "array",
  155. "items": {
  156. "type": "object"
  157. }
  158. }
  159. },
  160. "default": {
  161. "description": "generic error response",
  162. "schema": {
  163. "$ref": "#/definitions/error"
  164. }
  165. }
  166. }
  167. }
  168. }
  169. },
  170. "definitions": {
  171. "error": {
  172. "type": "object",
  173. "required": [
  174. "message"
  175. ],
  176. "properties": {
  177. "code": {
  178. "type": "integer",
  179. "format": "int64"
  180. },
  181. "message": {
  182. "type": "string"
  183. }
  184. }
  185. },
  186. "payload": {
  187. "type": "object",
  188. "required": [
  189. "load",
  190. "fuels",
  191. "powerplants"
  192. ],
  193. "properties": {
  194. "fuels": {
  195. "type": "object"
  196. },
  197. "load": {
  198. "type": "number",
  199. "format": "float64"
  200. },
  201. "powerplants": {
  202. "type": "array",
  203. "items": {
  204. "type": "object"
  205. }
  206. }
  207. }
  208. }
  209. }
  210. }`))
  211. }