Skip to content

Commit

Permalink
[OpenAPI] Add doc_tag to machine learning APIs (#2985)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored Oct 7, 2024
1 parent 470590b commit aff7b06
Show file tree
Hide file tree
Showing 73 changed files with 399 additions and 245 deletions.
2 changes: 1 addition & 1 deletion .spectral.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ rules:
oas2-schema: warn
# Tags
openapi-tags: warn
openapi-tags-alphabetical: info
openapi-tags-alphabetical: false
# Turn off some built-in rules
operation-description: false
operation-singular-tag: false
Expand Down
18 changes: 18 additions & 0 deletions docs/overlays/elasticsearch-shared-overlays.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,24 @@ actions:
# M
- name: ml
x-displayName: Machine learning
- name: ml anomaly
x-displayName: Machine learning anomaly detection
# description:
externalDocs:
url: https://www.elastic.co/guide/en/machine-learning/master/ml-ad-finding-anomalies.html
description: Finding anomalies
- name: ml data frame
x-displayName: Machine learning data frame analytics
# description:
externalDocs:
url: https://www.elastic.co/guide/en/machine-learning/master/ml-dfa-overview.html
description: Data frame analytics overview
- name: ml trained model
x-displayName: Machine learning trained model
# description:
externalDocs:
url: https://www.elastic.co/guide/en/machine-learning/master/ml-nlp-overview.html
description: Natural language processing overview
- name: migration
x-displayName: Migration
- name: monitoring
Expand Down
208 changes: 104 additions & 104 deletions output/openapi/elasticsearch-openapi.json

Large diffs are not rendered by default.

144 changes: 72 additions & 72 deletions output/openapi/elasticsearch-serverless-openapi.json

Large diffs are not rendered by default.

204 changes: 136 additions & 68 deletions output/schema/schema.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { Id } from '@_types/common'
* @availability stack since=8.5.0 stability=stable
* @availability serverless stability=stable visibility=private
* @cluster_privileges manage_ml
* @doc_tag ml trained model
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/close_job/MlCloseJobRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { Duration } from '@_types/Time'
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_id ml-close-job
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { Id } from '@_types/common'
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_id ml-delete-calendar
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { Id } from '@_types/common'
* @availability stack since=6.2.0 stability=stable
* @availability serverless stability=stable visibility=public
* @doc_id ml-delete-calendar-event
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { Id, Ids } from '@_types/common'
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_id ml-delete-calendar-job
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { Duration } from '@_types/Time'
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_id ml-delete-dfanalytics
* @doc_tag ml data frame
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { Id } from '@_types/common'
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_id ml-delete-datafeed
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { Duration } from '@_types/Time'
* @availability stack since=5.4.0 stability=stable
* @availability serverless stability=stable visibility=private
* @cluster_privileges manage_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/delete_filter/MlDeleteFilterRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { Id } from '@_types/common'
* @availability stack since=5.4.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { Duration } from '@_types/Time'
* @availability stack since=6.5.0 stability=stable
* @availability serverless stability=stable visibility=private
* @cluster_privileges manage_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/delete_job/MlDeleteJobRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { Id } from '@_types/common'
* @availability stack since=5.4.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { Id } from '@_types/common'
* @availability stack since=5.4.0 stability=stable
* @availability serverless stability=stable visibility=private
* @cluster_privileges manage_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { Id } from '@_types/common'
* @availability stack since=7.10.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_tag ml trained model
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { Id, Name } from '@_types/common'
* @availability stack since=7.13.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_tag ml trained model
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { long } from '@_types/Numeric'
* @availability stack since=7.7.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
body: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { QueryContainer } from '@_types/query_dsl/abstractions'
* @availability stack since=7.3.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges monitor_ml
* @doc_tag ml data frame
*/
export interface Request extends RequestBase {
body: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { integer } from '@_types/Numeric'
* @availability stack since=7.3.0 stability=stable
* @availability serverless stability=stable visibility=private
* @cluster_privileges monitor_ml
* @doc_tag ml data frame
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/flush_job/MlFlushJobRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { DateTime } from '@_types/Time'
* @availability stack since=5.4.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/forecast/MlForecastJobRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { Duration } from '@_types/Time'
* @availability stack since=6.1.0 stability=stable
* @availability serverless stability=stable visibility=private
* @cluster_privileges manage_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/get_buckets/MlGetBucketsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { DateTime } from '@_types/Time'
* @availability stack since=5.4.0 stability=stable
* @availability serverless stability=stable visibility=private
* @cluster_privileges monitor_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { DateTime } from '@_types/Time'
* @availability stack since=6.2.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges monitor_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/get_calendars/MlGetCalendarsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { integer } from '@_types/Numeric'
* @availability stack since=6.2.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges monitor_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/get_categories/MlGetCategoriesRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { integer } from '@_types/Numeric'
* @availability stack since=5.4.0 stability=stable
* @availability serverless stability=stable visibility=private
* @cluster_privileges monitor_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { integer } from '@_types/Numeric'
* @availability stack since=7.3.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges monitor_ml
* @doc_tag ml data frame
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { integer } from '@_types/Numeric'
* @availability stack since=7.3.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges monitor_ml
* @doc_tag ml data frame
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { Ids } from '@_types/common'
* @availability stack since=5.5.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges monitor_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/get_datafeeds/MlGetDatafeedsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { Ids } from '@_types/common'
* @availability stack since=5.5.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges monitor_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/get_filters/MlGetFiltersRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { integer } from '@_types/Numeric'
* @availability stack since=5.5.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import { DateTime } from '@_types/Time'
* @availability stack since=5.4.0 stability=stable
* @availability serverless stability=stable visibility=private
* @cluster_privileges monitor_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/get_job_stats/MlGetJobStatsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { Id } from '@_types/common'
* @availability stack since=5.5.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges monitor_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/get_jobs/MlGetJobsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { Ids } from '@_types/common'
* @availability stack since=5.5.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges monitor_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { Id } from '@_types/common'
* @availability stack since=7.16.0 stability=stable
* @availability serverless stability=stable visibility=private
* @cluster_privileges monitor_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { DateTime } from '@_types/Time'
* @availability stack since=5.4.0 stability=stable
* @availability serverless stability=stable visibility=private
* @cluster_privileges monitor_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import { DateTime, Duration } from '@_types/Time'
* @availability stack since=6.1.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges monitor_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/get_records/MlGetAnomalyRecordsRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { DateTime } from '@_types/Time'
* @availability stack since=5.4.0 stability=stable
* @availability serverless stability=stable visibility=private
* @cluster_privileges monitor_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { integer } from '@_types/Numeric'
* @availability stack since=7.10.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges monitor_ml
* @doc_tag ml trained model
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { integer } from '@_types/Numeric'
* @availability stack since=7.10.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges monitor_ml
* @doc_tag ml trained model
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { Duration } from '@_types/Time'
* @rest_spec_name ml.infer_trained_model
* @availability stack since=8.3.0 stability=stable
* @availability serverless stability=stable visibility=public
* @doc_tag ml trained model
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/open_job/MlOpenJobRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { Duration } from '@_types/Time'
* @availability stack since=5.4.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { CalendarEvent } from '../_types/CalendarEvent'
* @availability stack since=6.2.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/post_data/MlPostJobDataRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { DateTime } from '@_types/Time'
* @availability stack since=5.4.0 stability=stable
* @deprecated 7.11.0 Posting data directly to anomaly detection jobs is deprecated, in a future major version a datafeed will be required.
* @cluster_privileges manage_ml
* @doc_tag ml anomaly
*/
export interface Request<TData> extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { DataframePreviewConfig } from './types'
* @availability stack since=7.13.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges monitor_ml
* @doc_tag ml data frame
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import { DateTime } from '@_types/Time'
* @availability serverless stability=stable visibility=public
* @index_privileges read
* @cluster_privileges manage_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
1 change: 1 addition & 0 deletions specification/ml/put_calendar/MlPutCalendarRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { Id } from '@_types/common'
* @availability stack since=6.2.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { Id, Ids } from '@_types/common'
* @availability stack since=6.2.0 stability=stable
* @availability serverless stability=stable visibility=public
* @cluster_privileges manage_ml
* @doc_tag ml anomaly
*/
export interface Request extends RequestBase {
path_parts: {
Expand Down
Loading

0 comments on commit aff7b06

Please sign in to comment.