Skip to content

Commit d3cdec5

Browse files
committed
Stop reading docUrl, docTag, extDocUrl, requestBodyRequired and availability from rest-api-spec
1 parent ae54697 commit d3cdec5

File tree

5 files changed

+7
-20
lines changed

5 files changed

+7
-20
lines changed

compiler/src/model/build-model.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,9 @@ export function compileEndpoints (jsonSpec: Map<string, JsonSpec>): Record<strin
6565
map[api] = {
6666
name: api,
6767
description: spec.documentation.description,
68-
docUrl: spec.documentation.url,
69-
docTag: spec.docTag,
70-
extDocUrl: spec.externalDocs?.url,
71-
// Setting these values by default should be removed
72-
// when we no longer use rest-api-spec stubs as the
73-
// source of truth for stability/visibility.
74-
availability: {},
68+
docUrl: null,
7569
request: null,
76-
requestBodyRequired: Boolean(spec.body?.required),
70+
requestBodyRequired: false,
7771
response: null,
7872
urls: spec.url.paths.map(path => {
7973
return {
@@ -83,9 +77,7 @@ export function compileEndpoints (jsonSpec: Map<string, JsonSpec>): Record<strin
8377
}
8478
})
8579
}
86-
if (typeof spec.feature_flag === 'string') {
87-
map[api].availability.stack = { featureFlag: spec.feature_flag }
88-
}
80+
map[api].availability = {}
8981
}
9082
return map
9183
}

compiler/src/model/json-spec.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ export interface JsonSpec {
3030
url: string
3131
description: string
3232
}
33-
stability: model.Stability
34-
visibility: model.Visibility
3533
feature_flag?: string
3634
headers: {
3735
accept?: string[]
@@ -61,11 +59,6 @@ export interface JsonSpec {
6159
description: string
6260
required?: boolean
6361
}
64-
docTag?: string
65-
externalDocs?: {
66-
url: string
67-
description?: string
68-
}
6962
}
7063

7164
export default function buildJsonSpec (): Map<string, JsonSpec> {

output/schema/schema.json

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ ml-get-memory,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operat
484484
ml-get-overall-buckets,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-overall-buckets,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-overall-buckets.html,
485485
ml-get-record,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-records,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-record.html,
486486
ml-get-snapshot,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-model-snapshots,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-get-snapshot.html,
487-
ml-jobs,https://www.elastic.co/docs/explore-analyze/machine-learning/anomaly-detection/ml-ad-run-jobs,,
487+
ml-jobs,https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html,,
488488
ml-model-snapshots,https://www.elastic.co/docs/explore-analyze/machine-learning/anomaly-detection/ml-ad-run-jobs#ml-ad-model-snapshots,,
489489
ml-open-job,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-open-job,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-open-job.html,
490490
ml-post-calendar-event,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-post-calendar-events,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/ml-post-calendar-event.html,

specification/ml/validate/MlValidateJobRequest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import { ModelPlotConfig } from '@ml/_types/ModelPlot'
3030
* @rest_spec_name ml.validate
3131
* @availability stack since=6.3.0 stability=stable visibility=private
3232
* @availability serverless stability=stable visibility=private
33+
* @doc_id ml-jobs
3334
* @doc_tag ml anomaly
3435
*/
3536
export interface Request extends RequestBase {

0 commit comments

Comments
 (0)