electron/docs/api-history.schema.json
Piotr Płaczek 4d51edc504
docs: api history (#42982)
* feat(api-history): api history schema

Reference: f36e0a8483/text/0004-api-history-schema.md

* feat(api-history): add `lint:api-history` to `package.json`

* docs(api-history): add api history to `styleguide.md`

* docs(api-history): `win.flashFrame(flag)`

* docs(api-history): `new WebContentsView([options])`

* docs(api-history): non-navigation APIs on `WebContents`

* docs(api-history): `nativeImage.toDataURL`

* docs(api-history): `window.flashFrame(bool)`

* docs(api-history): `browser-view.md`

* docs(api-history): `ipcRenderer`

* docs(api-history): `protocol.*Protocol`

* revert: `new WebContentsView([options])`

This reverts commit 0a11efcf57cdf1f061ed4a3272e87f06d2fc7cb0.

* Apply suggestions from code review

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* fix(api-history): remove incorrect `pr-url`

Reference: https://github.com/electron/electron/pull/42982/files#r1692532877

* docs(api-history): schema word choice

Co-authored-by: Erick Zhao <erick@hotmail.ca>

Reference: 0b1b6a7cc0

* docs(api-history): nicer format example in `styleguide.md`

Reference: https://github.com/electron/electron/pull/42982#discussion_r1692539906

* docs(api-history): Always use double quotes for descriptions

* docs(api-history): `styleguide.md` improvements

* docs(api-history): copy `ipc-renderer.md` change to `context-bridge.md`

* docs(api-history): `styleguide.md` placement

* docs(api-history): add migration guide

* docs(api-history): remove confusing `breaking-changes-header` in `browser-view.md`

Reference: 7b03c0703d (r1703444772)

* docs(api-history): move migration guide

Reference: https://github.com/electron/electron/pull/42982#discussion_r1703441001

* docs(api-history): update `breaking-changer-header`

Reference: https://github.com/electron/electron/pull/43217

* docs(api-history): deprecate `browser-view.md`

---------

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
2024-08-19 11:17:10 -07:00

47 lines
2.2 KiB
JSON

{
"title": "JSON schema for API history blocks in Electron documentation",
"$schema": "http://json-schema.org/draft-07/schema#",
"$comment": "If you change this schema, remember to edit the TypeScript interfaces in the linting script.",
"definitions": {
"baseChangeSchema": {
"type": "object",
"properties": {
"pr-url": {
"description": "URL to the 'main' GitHub Pull Request for the change (i.e. not a backport PR)",
"type": "string", "pattern": "^https://github.com/electron/electron/pull/\\d+$",
"examples": [ "https://github.com/electron/electron/pull/26789" ]
},
"breaking-changes-header": {
"description": "Heading ID for the change in `electron/docs/breaking-changes.md`",
"type": "string", "minLength": 3,
"examples": [ "deprecated-browserwindowsettrafficlightpositionposition" ]
},
"description": {
"description": "Short description of the change",
"type": "string", "minLength": 3, "maxLength": 120,
"examples": [ "Made `trafficLightPosition` option work for `customButtonOnHover`." ]
}
},
"required": [ "pr-url" ],
"additionalProperties": false
},
"addedChangeSchema": {
"allOf": [ { "$ref": "#/definitions/baseChangeSchema" } ]
},
"deprecatedChangeSchema": {
"$comment": "TODO: Make 'breaking-changes-header' required in the future.",
"allOf": [ { "$ref": "#/definitions/baseChangeSchema" } ]
},
"changesChangeSchema": {
"$comment": "Unlike RFC, added `'type': 'object'` to appease AJV strict mode",
"allOf": [ { "$ref": "#/definitions/baseChangeSchema" }, { "type": "object", "required": [ "description" ] } ]
}
},
"type": "object",
"properties": {
"added": { "type": "array", "minItems": 1, "maxItems": 1, "items": { "$ref": "#/definitions/addedChangeSchema" } },
"deprecated": { "type": "array", "minItems": 1, "maxItems": 1, "items": { "$ref": "#/definitions/deprecatedChangeSchema" } },
"changes": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/changesChangeSchema" } }
},
"additionalProperties": false
}