Skip to content

Commit

Permalink
Fix the API docs bug, where optional functions on interfaces were los…
Browse files Browse the repository at this point in the history
…ing their children. (elastic#107236)

* Fix the bug and update tests

* update api docs

* Fix tests
# Conflicts:
#	api_docs/charts.mdx
#	api_docs/data.json
#	api_docs/data.mdx
#	api_docs/data_autocomplete.mdx
#	api_docs/data_field_formats.mdx
#	api_docs/data_index_patterns.mdx
#	api_docs/data_query.mdx
#	api_docs/data_search.json
#	api_docs/data_search.mdx
#	api_docs/data_ui.mdx
#	api_docs/deprecations_by_api.mdx
#	api_docs/deprecations_by_plugin.mdx
#	api_docs/es_ui_shared.mdx
#	api_docs/fleet.mdx
#	api_docs/reporting.json
#	api_docs/rule_registry.mdx
#	api_docs/security_solution.json
#	api_docs/security_solution.mdx
#	api_docs/timelines.json
#	api_docs/timelines.mdx
#	api_docs/visualizations.mdx
  • Loading branch information
stacey-gammon committed Aug 9, 2021
1 parent 693eb72 commit ff74e6c
Show file tree
Hide file tree
Showing 137 changed files with 14,716 additions and 7,112 deletions.
36 changes: 34 additions & 2 deletions api_docs/actions.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@
],
"path": "x-pack/plugins/actions/server/types.ts",
"deprecated": false,
"returnComment": [],
"children": []
"children": [],
"returnComment": []
},
{
"parentPluginId": "actions",
Expand Down Expand Up @@ -1838,6 +1838,22 @@
],
"path": "x-pack/plugins/actions/common/rewrite_request_case.ts",
"deprecated": false,
"returnComment": [],
"children": [
{
"parentPluginId": "actions",
"id": "def-common.requested",
"type": "Object",
"tags": [],
"label": "requested",
"description": [],
"signature": [
"{ [K in keyof T as CamelToSnake<RenameActionToConnector<Extract<K, string>>>]: T[K]; }"
],
"path": "x-pack/plugins/actions/common/rewrite_request_case.ts",
"deprecated": false
}
],
"initialIsOpen": false
},
{
Expand Down Expand Up @@ -1868,6 +1884,22 @@
],
"path": "x-pack/plugins/actions/common/rewrite_request_case.ts",
"deprecated": false,
"returnComment": [],
"children": [
{
"parentPluginId": "actions",
"id": "def-common.responded",
"type": "Uncategorized",
"tags": [],
"label": "responded",
"description": [],
"signature": [
"T"
],
"path": "x-pack/plugins/actions/common/rewrite_request_case.ts",
"deprecated": false
}
],
"initialIsOpen": false
}
],
Expand Down
2 changes: 1 addition & 1 deletion api_docs/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import actionsObj from './actions.json';

| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
| 117 | 0 | 117 | 7 |
| 119 | 0 | 119 | 7 |

## Server

Expand Down
146 changes: 102 additions & 44 deletions api_docs/alerting.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,48 @@
],
"path": "x-pack/plugins/alerting/public/alert_navigation_registry/types.ts",
"deprecated": false,
"returnComment": [
"A URL that is meant to be relative to your application id, or a state object that your application uses to render\nthe rule. This information is intended to be used with cores NavigateToApp function, along with the application id that was\noriginally registered to {@link PluginSetupContract.registerNavigation}."
],
"children": [
{
"parentPluginId": "alerting",
"id": "def-public.alert",
"type": "Object",
"tags": [],
"label": "alert",
"description": [],
"signature": [
"{ enabled: boolean; id: string; name: string; params: never; actions: ",
{
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertingPluginApi",
"section": "def-common.AlertAction",
"text": "AlertAction"
},
"[]; throttle: string | null; tags: string[]; alertTypeId: string; consumer: string; schedule: ",
{
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertingPluginApi",
"section": "def-common.IntervalSchedule",
"text": "IntervalSchedule"
},
"; scheduledTaskId?: string | undefined; createdBy: string | null; updatedBy: string | null; createdAt: Date; updatedAt: Date; apiKeyOwner: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\" | null; muteAll: boolean; mutedInstanceIds: string[]; executionStatus: ",
{
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertingPluginApi",
"section": "def-common.AlertExecutionStatus",
"text": "AlertExecutionStatus"
},
"; }"
],
"path": "x-pack/plugins/alerting/public/alert_navigation_registry/types.ts",
"deprecated": false
}
],
"initialIsOpen": false
}
],
Expand Down Expand Up @@ -67,57 +109,63 @@
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false,
"returnComment": [],
"children": [
{
"parentPluginId": "alerting",
"id": "def-public.applicationId",
"id": "def-public.PluginSetupContract.registerNavigation.$1",
"type": "string",
"tags": [],
"label": "applicationId",
"description": [
"The application id that the user should be navigated to, to view a particular alert in a custom way."
],
"signature": [
"string"
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false
"deprecated": false,
"isRequired": true
},
{
"parentPluginId": "alerting",
"id": "def-public.ruleType",
"id": "def-public.PluginSetupContract.registerNavigation.$2",
"type": "string",
"tags": [],
"label": "ruleType",
"description": [
"The rule type that has been registered with Alerting.Server.PluginSetupContract.registerType. If\nno such rule with that id exists, a warning is output to the console log. It used to throw an error, but that was temporarily moved\nbecause it was causing flaky test failures with https://github.com/elastic/kibana/issues/59229 and needs to be\ninvestigated more."
],
"signature": [
"string"
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false
"deprecated": false,
"isRequired": true
},
{
"parentPluginId": "alerting",
"id": "def-public.handler",
"id": "def-public.PluginSetupContract.registerNavigation.$3",
"type": "Function",
"tags": [],
"label": "handler",
"description": [
"The navigation handler should return either a relative URL, or a state object. This information can be used,\nin conjunction with the consumer id, to navigate the user to a custom URL to view a rule's details."
],
"signature": [
"(alert: Pick<",
{
"pluginId": "alerting",
"scope": "common",
"scope": "public",
"docId": "kibAlertingPluginApi",
"section": "def-common.Alert",
"text": "Alert"
},
"<never>, \"enabled\" | \"id\" | \"name\" | \"params\" | \"actions\" | \"throttle\" | \"tags\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">) => string | ",
"JsonObject"
"section": "def-public.AlertNavigationHandler",
"text": "AlertNavigationHandler"
}
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false
"deprecated": false,
"isRequired": true
}
]
],
"returnComment": []
},
{
"parentPluginId": "alerting",
Expand All @@ -141,45 +189,47 @@
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false,
"returnComment": [],
"children": [
{
"parentPluginId": "alerting",
"id": "def-public.applicationId",
"id": "def-public.PluginSetupContract.registerDefaultNavigation.$1",
"type": "string",
"tags": [],
"label": "applicationId",
"description": [
"The application id that the user should be navigated to, to view a particular alert in a custom way."
],
"signature": [
"string"
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false
"deprecated": false,
"isRequired": true
},
{
"parentPluginId": "alerting",
"id": "def-public.handler",
"id": "def-public.PluginSetupContract.registerDefaultNavigation.$2",
"type": "Function",
"tags": [],
"label": "handler",
"description": [
"The navigation handler should return either a relative URL, or a state object. This information can be used,\nin conjunction with the consumer id, to navigate the user to a custom URL to view a rule's details."
],
"signature": [
"(alert: Pick<",
{
"pluginId": "alerting",
"scope": "common",
"scope": "public",
"docId": "kibAlertingPluginApi",
"section": "def-common.Alert",
"text": "Alert"
},
"<never>, \"enabled\" | \"id\" | \"name\" | \"params\" | \"actions\" | \"throttle\" | \"tags\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"notifyWhen\" | \"muteAll\" | \"mutedInstanceIds\" | \"executionStatus\">) => string | ",
"JsonObject"
"section": "def-public.AlertNavigationHandler",
"text": "AlertNavigationHandler"
}
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false
"deprecated": false,
"isRequired": true
}
]
],
"returnComment": []
}
],
"lifecycle": "setup",
Expand Down Expand Up @@ -223,19 +273,23 @@
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false,
"returnComment": [],
"children": [
{
"parentPluginId": "alerting",
"id": "def-public.alertId",
"id": "def-public.PluginStartContract.getNavigation.$1",
"type": "string",
"tags": [],
"label": "alertId",
"description": [],
"signature": [
"string"
],
"path": "x-pack/plugins/alerting/public/plugin.ts",
"deprecated": false
"deprecated": false,
"isRequired": true
}
]
],
"returnComment": []
}
],
"lifecycle": "start",
Expand Down Expand Up @@ -955,8 +1009,8 @@
],
"path": "x-pack/plugins/alerting/server/types.ts",
"deprecated": false,
"returnComment": [],
"children": []
"children": [],
"returnComment": []
},
{
"parentPluginId": "alerting",
Expand Down Expand Up @@ -995,8 +1049,8 @@
],
"path": "x-pack/plugins/alerting/server/types.ts",
"deprecated": false,
"returnComment": [],
"children": []
"children": [],
"returnComment": []
},
{
"parentPluginId": "alerting",
Expand All @@ -1010,8 +1064,8 @@
],
"path": "x-pack/plugins/alerting/server/types.ts",
"deprecated": false,
"returnComment": [],
"children": []
"children": [],
"returnComment": []
}
],
"initialIsOpen": false
Expand Down Expand Up @@ -1102,19 +1156,23 @@
],
"path": "x-pack/plugins/alerting/server/types.ts",
"deprecated": false,
"returnComment": [],
"children": [
{
"parentPluginId": "alerting",
"id": "def-server.id",
"id": "def-server.AlertServices.alertInstanceFactory.$1",
"type": "string",
"tags": [],
"label": "id",
"description": [],
"signature": [
"string"
],
"path": "x-pack/plugins/alerting/server/types.ts",
"deprecated": false
"deprecated": false,
"isRequired": true
}
]
],
"returnComment": []
}
],
"initialIsOpen": false
Expand Down Expand Up @@ -1660,8 +1718,8 @@
],
"path": "x-pack/plugins/alerting/server/plugin.ts",
"deprecated": false,
"returnComment": [],
"children": []
"children": [],
"returnComment": []
}
],
"initialIsOpen": false
Expand Down
2 changes: 1 addition & 1 deletion api_docs/alerting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import alertingObj from './alerting.json';

| Public API count | Any count | Items lacking comments | Missing exports |
|-------------------|-----------|------------------------|-----------------|
| 242 | 0 | 234 | 16 |
| 243 | 0 | 235 | 16 |

## Client

Expand Down
Loading

0 comments on commit ff74e6c

Please sign in to comment.