api-history.schema.json 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. {
  2. "title": "JSON schema for API history blocks in Electron documentation",
  3. "$schema": "http://json-schema.org/draft-07/schema#",
  4. "$comment": "If you change this schema, remember to edit the TypeScript interfaces in the linting script.",
  5. "definitions": {
  6. "baseChangeSchema": {
  7. "type": "object",
  8. "properties": {
  9. "pr-url": {
  10. "description": "URL to the 'main' GitHub Pull Request for the change (i.e. not a backport PR)",
  11. "type": "string", "pattern": "^https://github.com/electron/electron/pull/\\d+$",
  12. "examples": [ "https://github.com/electron/electron/pull/26789" ]
  13. },
  14. "breaking-changes-header": {
  15. "description": "Heading ID for the change in `electron/docs/breaking-changes.md`",
  16. "type": "string", "minLength": 3,
  17. "examples": [ "deprecated-browserwindowsettrafficlightpositionposition" ]
  18. },
  19. "description": {
  20. "description": "Short description of the change",
  21. "type": "string", "minLength": 3, "maxLength": 120,
  22. "examples": [ "Made `trafficLightPosition` option work for `customButtonOnHover`." ]
  23. }
  24. },
  25. "required": [ "pr-url" ],
  26. "additionalProperties": false
  27. },
  28. "addedChangeSchema": {
  29. "allOf": [ { "$ref": "#/definitions/baseChangeSchema" } ]
  30. },
  31. "deprecatedChangeSchema": {
  32. "$comment": "TODO: Make 'breaking-changes-header' required in the future.",
  33. "allOf": [ { "$ref": "#/definitions/baseChangeSchema" } ]
  34. },
  35. "changesChangeSchema": {
  36. "$comment": "Unlike RFC, added `'type': 'object'` to appease AJV strict mode",
  37. "allOf": [ { "$ref": "#/definitions/baseChangeSchema" }, { "type": "object", "required": [ "description" ] } ]
  38. }
  39. },
  40. "type": "object",
  41. "properties": {
  42. "added": { "type": "array", "minItems": 1, "maxItems": 1, "items": { "$ref": "#/definitions/addedChangeSchema" } },
  43. "deprecated": { "type": "array", "minItems": 1, "maxItems": 1, "items": { "$ref": "#/definitions/deprecatedChangeSchema" } },
  44. "changes": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/changesChangeSchema" } }
  45. },
  46. "additionalProperties": false
  47. }