post.json 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. {
  2. "operationId": "validateCertificates",
  3. "summary": "Validates given Custom Certificates",
  4. "tags": ["Certificates"],
  5. "security": [
  6. {
  7. "BearerAuth": ["certificates"]
  8. }
  9. ],
  10. "requestBody": {
  11. "description": "Certificate Files",
  12. "required": true,
  13. "content": {
  14. "multipart/form-data": {
  15. "schema": {
  16. "type": "object",
  17. "additionalProperties": false,
  18. "required": ["certificate", "certificate_key"],
  19. "properties": {
  20. "certificate": {
  21. "type": "string"
  22. },
  23. "certificate_key": {
  24. "type": "string"
  25. },
  26. "intermediate_certificate": {
  27. "type": "string"
  28. }
  29. }
  30. }
  31. }
  32. }
  33. },
  34. "responses": {
  35. "200": {
  36. "description": "200 response",
  37. "content": {
  38. "application/json": {
  39. "examples": {
  40. "default": {
  41. "value": {
  42. "certificate": {
  43. "cn": "mkcert",
  44. "issuer": "O = mkcert development CA, OU = [email protected] (John Doe), CN = mkcert [email protected] (John Doe)",
  45. "dates": {
  46. "from": 1728458537,
  47. "to": 1799479337
  48. }
  49. },
  50. "certificate_key": true
  51. }
  52. }
  53. },
  54. "schema": {
  55. "type": "object",
  56. "additionalProperties": false,
  57. "required": ["certificate", "certificate_key"],
  58. "properties": {
  59. "certificate": {
  60. "type": "object",
  61. "additionalProperties": false,
  62. "required": ["cn", "issuer", "dates"],
  63. "properties": {
  64. "cn": {
  65. "type": "string"
  66. },
  67. "issuer": {
  68. "type": "string"
  69. },
  70. "dates": {
  71. "type": "object",
  72. "additionalProperties": false,
  73. "required": ["from", "to"],
  74. "properties": {
  75. "from": {
  76. "type": "integer"
  77. },
  78. "to": {
  79. "type": "integer"
  80. }
  81. }
  82. }
  83. }
  84. },
  85. "certificate_key": {
  86. "type": "boolean"
  87. }
  88. }
  89. }
  90. }
  91. }
  92. },
  93. "400": {
  94. "description": "400 response",
  95. "content": {
  96. "application/json": {
  97. "examples": {
  98. "default": {
  99. "value": {
  100. "error": {
  101. "code": 400,
  102. "message": "Certificate is not valid"
  103. }
  104. }
  105. }
  106. },
  107. "schema": {
  108. "$ref": "../../../../components/error.json"
  109. }
  110. }
  111. }
  112. }
  113. }
  114. }