swagger.yml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. type: object
  52. error:
  53. type: object
  54. required:
  55. - message
  56. properties:
  57. code:
  58. type: integer
  59. format: int64
  60. message:
  61. type: string
  62. produces:
  63. - application/eu.reverservices.gem.spaas.v1+json
  64. schemes:
  65. - http
  66. swagger: "2.0"