Brak opisu

openapi.yaml 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. openapi: 3.0.3
  2. info:
  3. title: SOC Demo Flask API
  4. version: 1.0.0
  5. description: OpenAPI-first Flask service for Shuffle testing.
  6. servers:
  7. - url: http://localhost:8000
  8. paths:
  9. /health:
  10. get:
  11. operationId: app.handlers.health_check
  12. summary: Health check
  13. responses:
  14. "200":
  15. description: Service is healthy
  16. content:
  17. application/json:
  18. schema:
  19. $ref: "#/components/schemas/HealthResponse"
  20. /echo:
  21. post:
  22. operationId: app.handlers.echo_body
  23. summary: Echo request body
  24. requestBody:
  25. required: true
  26. content:
  27. application/json:
  28. schema:
  29. $ref: "#/components/schemas/EchoRequest"
  30. responses:
  31. "200":
  32. description: Echo response
  33. content:
  34. application/json:
  35. schema:
  36. $ref: "#/components/schemas/EchoResponse"
  37. /ioc/{value}:
  38. get:
  39. operationId: app.handlers.lookup_ioc
  40. summary: Basic IOC classification demo
  41. parameters:
  42. - name: value
  43. in: path
  44. required: true
  45. schema:
  46. type: string
  47. - name: ioc_type
  48. in: query
  49. required: false
  50. schema:
  51. type: string
  52. default: auto
  53. responses:
  54. "200":
  55. description: IOC lookup result
  56. content:
  57. application/json:
  58. schema:
  59. $ref: "#/components/schemas/LookupResponse"
  60. components:
  61. schemas:
  62. HealthResponse:
  63. type: object
  64. properties:
  65. status:
  66. type: string
  67. example: ok
  68. timestamp:
  69. type: string
  70. format: date-time
  71. required:
  72. - status
  73. - timestamp
  74. EchoRequest:
  75. type: object
  76. additionalProperties: true
  77. example:
  78. message: test from Shuffle
  79. EchoResponse:
  80. type: object
  81. properties:
  82. received:
  83. type: object
  84. additionalProperties: true
  85. length:
  86. type: integer
  87. required:
  88. - received
  89. - length
  90. LookupResponse:
  91. type: object
  92. properties:
  93. input:
  94. type: string
  95. type:
  96. type: string
  97. verdict:
  98. type: string
  99. example: domain-like
  100. source:
  101. type: string
  102. required:
  103. - input
  104. - type
  105. - verdict
  106. - source