post.json 2.1 KB

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