swagger.json 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. {
  2. "openapi": "3.0.1",
  3. "info": {
  4. "title": "Api documentation",
  5. "version": "1.0.0"
  6. },
  7. "paths": {
  8. "/pdf/sync-job": {
  9. "post": {
  10. "responses": {
  11. "202": {
  12. "content": {
  13. "application/json": {
  14. "schema": {
  15. "type": "object",
  16. "properties": {
  17. "status": {
  18. "type": "string",
  19. "enum": [
  20. "HTML_EXPORT_IN_PROGRESS",
  21. "HTML_EXPORT_DONE",
  22. "FAILED",
  23. "PDF_EXPORT_DONE"
  24. ]
  25. }
  26. },
  27. "required": [
  28. "status"
  29. ]
  30. }
  31. }
  32. },
  33. "description": "Accepted"
  34. },
  35. "500": {
  36. "content": {
  37. "application/json": {
  38. "schema": {
  39. "$ref": "#/components/schemas/InternalServerError"
  40. }
  41. }
  42. },
  43. "description": "Internal Server Error"
  44. }
  45. },
  46. "description": "\n Sync job pdf convert status with GROWI.\n Register or update job inside pdf-converter with given jobId, expirationDate, and status.\n Return resulting status of job to GROWI.\n ",
  47. "parameters": [],
  48. "requestBody": {
  49. "required": false,
  50. "content": {
  51. "application/json": {
  52. "schema": {
  53. "properties": {
  54. "jobId": {
  55. "type": "string"
  56. },
  57. "expirationDate": {
  58. "type": "string"
  59. },
  60. "status": {
  61. "type": "string",
  62. "enum": [
  63. "HTML_EXPORT_IN_PROGRESS",
  64. "HTML_EXPORT_DONE",
  65. "FAILED"
  66. ]
  67. }
  68. },
  69. "type": "object"
  70. }
  71. }
  72. }
  73. },
  74. "tags": [
  75. "PdfCtrl"
  76. ],
  77. "operationId": "pdfCtrlSyncJobStatus"
  78. }
  79. }
  80. },
  81. "tags": [
  82. {
  83. "name": "PdfCtrl"
  84. }
  85. ],
  86. "components": {
  87. "schemas": {
  88. "InternalServerError": {
  89. "type": "object",
  90. "properties": {
  91. "name": {
  92. "type": "string",
  93. "minLength": 1,
  94. "description": "The error name",
  95. "example": "INTERNAL_SERVER_ERROR",
  96. "default": "INTERNAL_SERVER_ERROR"
  97. },
  98. "message": {
  99. "type": "string",
  100. "minLength": 1,
  101. "description": "An error message"
  102. },
  103. "status": {
  104. "type": "number",
  105. "description": "The status code of the exception",
  106. "example": 500,
  107. "default": 500
  108. },
  109. "errors": {
  110. "type": "array",
  111. "items": {
  112. "$ref": "#/components/schemas/GenericError"
  113. },
  114. "description": "A list of related errors"
  115. },
  116. "stack": {
  117. "type": "string",
  118. "description": "The stack trace (only in development mode)"
  119. }
  120. },
  121. "required": [
  122. "name",
  123. "message",
  124. "status"
  125. ]
  126. },
  127. "GenericError": {
  128. "type": "object",
  129. "properties": {
  130. "name": {
  131. "type": "string",
  132. "minLength": 1,
  133. "description": "The error name"
  134. },
  135. "message": {
  136. "type": "string",
  137. "minLength": 1,
  138. "description": "An error message"
  139. }
  140. },
  141. "additionalProperties": true,
  142. "required": [
  143. "name",
  144. "message"
  145. ]
  146. }
  147. }
  148. }
  149. }