swagger.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. consumes:
  2. - application/eu.reverservices.gem.spaas.v1+json
  3. info:
  4. description: This API exposes an algorithm that computes optimal power production
  5. allocation for a given power need and power plant capacity.
  6. title: Optimal power production allocation service
  7. version: 0.0.1
  8. paths:
  9. /productionplan:
  10. post:
  11. summary: compute production plan
  12. consumes:
  13. - application/json
  14. operationId: ProductionPlan
  15. parameters:
  16. - in: body
  17. name: payload format
  18. schema:
  19. $ref: "#/definitions/payload"
  20. description: |
  21. Compute the optimal production plan for given load and capacity.
  22. produces:
  23. - application/json
  24. responses:
  25. 200:
  26. description: returns optimal production plan
  27. schema:
  28. type: array
  29. items:
  30. type: object
  31. default:
  32. description: generic error response
  33. schema:
  34. $ref: "#/definitions/error"
  35. definitions:
  36. payload:
  37. type: object
  38. required:
  39. - load
  40. - fuels
  41. - powerplants
  42. properties:
  43. load:
  44. type: number
  45. format: float64
  46. fuels:
  47. type: object
  48. powerplants:
  49. type: array
  50. items:
  51. $ref: "#/definitions/powerplant"
  52. powerplant:
  53. type: object
  54. required:
  55. - name
  56. - type
  57. - efficiency
  58. - pmin
  59. - pmax
  60. properties:
  61. name:
  62. type: string
  63. type:
  64. type: string
  65. efficiency:
  66. type: number
  67. format: float64
  68. pmin:
  69. type: number
  70. format: float64
  71. pmax:
  72. type: number
  73. format: float64
  74. error:
  75. type: object
  76. required:
  77. - message
  78. properties:
  79. code:
  80. type: integer
  81. format: int64
  82. message:
  83. type: string
  84. produces:
  85. - application/eu.reverservices.gem.spaas.v1+json
  86. schemes:
  87. - http
  88. swagger: "2.0"