analysis.json 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {
  2. "$schema": "http://json-schema.org/draft-04/schema#",
  3. "type": "object",
  4. "properties": {
  5. "timestamp": {
  6. "description": "the number of seconds since the Unix epoch",
  7. "type": "string",
  8. "minLength": 10,
  9. "maxLength": 10,
  10. "pattern": "[0-9]{10,10}"
  11. },
  12. "status": {
  13. "description": "represents the overall status of all messages from the analysis results",
  14. "oneOf": [{
  15. "$ref": "#/definitions/lgtm"
  16. }, {
  17. "$ref": "#/definitions/fyi"
  18. }, {
  19. "$ref": "#/definitions/nmw"
  20. }]
  21. },
  22. "url": {
  23. "description": "a publicly readable file, which contains JSON formatted analysis results. Those results should conform to the JSON format of the ShipshapeResponse protocol buffer message defined https://github.com/google/shipshape/blob/master/shipshape/proto/shipshape_rpc.proto",
  24. "type": "string"
  25. },
  26. "v": {
  27. "type": "integer",
  28. "enum": [0]
  29. }
  30. },
  31. "required": [
  32. "timestamp",
  33. "url"
  34. ],
  35. "definitions": {
  36. "lgtm": {
  37. "title": "Looks Good To Me",
  38. "description": "indicates the analysis produced no messages",
  39. "type": "string",
  40. "enum": ["lgtm"]
  41. },
  42. "fyi": {
  43. "title": "For your information",
  44. "description": "indicates the analysis produced some messages, but none of them indicate errors",
  45. "type": "string",
  46. "enum": ["fyi"]
  47. },
  48. "nmw": {
  49. "title": "Needs more work",
  50. "description": "indicates the analysis produced at least one message indicating an error",
  51. "type": "string",
  52. "enum": ["nmw"]
  53. }
  54. }
  55. }