capabilities.schema.json 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {
  2. "$schema": "http://json-schema.org/draft-07/schema#",
  3. "title": "capabilities.json 输出格式",
  4. "type": "object",
  5. "required": ["requirement", "capabilities-boundary"],
  6. "properties": {
  7. "requirement": { "type": "string", "minLength": 1 },
  8. "capabilities-boundary": {
  9. "type": "array",
  10. "minItems": 1,
  11. "items": {
  12. "type": "object",
  13. "required": ["id-ref", "name-ref", "description-ref", "case_references-boundary"],
  14. "properties": {
  15. "id-ref": { "type": "string", "minLength": 1 },
  16. "name-ref": { "type": "string", "minLength": 1 },
  17. "description-ref": { "type": "string", "minLength": 1 },
  18. "case_references-boundary": {
  19. "type": "array",
  20. "minItems": 1,
  21. "items": { "type": "string", "pattern": "^[a-z]+_[A-Za-z0-9_-]+$" }
  22. },
  23. "enriched_details-boundary": {
  24. "oneOf": [
  25. { "type": "null" },
  26. {
  27. "type": "object",
  28. "required": ["name-ref", "description-ref", "method", "effects-boundary", "body", "inputs", "outputs"],
  29. "properties": {
  30. "name-ref": { "type": "string", "minLength": 1 },
  31. "description-ref": { "type": "string", "minLength": 1 },
  32. "method": { "type": "string", "minLength": 1 },
  33. "effects-boundary": { "type": "array", "items": { "type": "string" } },
  34. "failure_modes": { "type": "string" },
  35. "inputs": { "type": "object" },
  36. "outputs": { "type": "object" },
  37. "body": { "type": "string", "minLength": 1 },
  38. "visual_notes": { "type": "string" }
  39. }
  40. }
  41. ]
  42. }
  43. }
  44. }
  45. }
  46. }
  47. }