Skip to content

Commit 0897226

Browse files
committed
Add profiling stubs
The purpose is to add enough data to generate the rest-api-spec.
1 parent 0a319e4 commit 0897226

File tree

12 files changed

+476
-16
lines changed

12 files changed

+476
-16
lines changed

compiler/src/steps/validate-model.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ enum JsonEvent {
3737
array = 'array'
3838
}
3939

40-
const privateNamespaces = ['_internal', 'profiling']
41-
4240
/**
4341
* Validates the internal consistency of the model (doesn't check the json spec)
4442
*
@@ -220,11 +218,6 @@ export default async function validateModel (apiModel: model.Model, restSpec: Ma
220218
function validateEndpoint (endpoint: model.Endpoint): void {
221219
setRootContext(endpoint.name, 'request')
222220

223-
// Skip validation for internal endpoints
224-
if (privateNamespaces.some(ns => endpoint.name.startsWith(ns))) {
225-
return
226-
}
227-
228221
if (endpoint.request !== null) {
229222
const reqType = getTypeDef(endpoint.request)
230223

output/schema/schema.json

Lines changed: 219 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 24 additions & 0 deletions
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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,7 @@ time-value,https://github.com/elastic/elasticsearch/blob/current/libs/core/src/m
936936
time-zone-id,https://docs.oracle.com/javase/8/docs/api/java/time/ZoneId.html,,
937937
transform-set-upgrade-mode,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-set-upgrade-mode,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/transform-set-upgrade-mode.html,
938938
trim-processor,https://www.elastic.co/docs/reference/enrich-processor/trim-processor,,
939+
universal-profiling,https://www.elastic.co/guide/en/observability/current/universal-profiling.html,,
939940
update-by-query,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-by-query-api,,
940941
update-dfanalytics,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-data-frame-analytics,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/update-dfanalytics.html,
941942
update-desired-nodes,https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster,https://www.elastic.co/guide/en/elasticsearch/reference/8.18/cluster.html,
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { RequestBase } from '@_types/Base'
21+
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
22+
23+
/**
24+
* Returns basic information about the status of Universal Profiling.
25+
*
26+
* @rest_spec_name profiling.flamegraph
27+
* @availability stack stability=stable visibility=private
28+
* @doc_id universal-profiling
29+
*/
30+
export interface Request extends RequestBase {
31+
urls: [
32+
{
33+
path: '/_profiling/flamegraph'
34+
methods: ['POST']
35+
}
36+
]
37+
/** @codegen_name conditions */
38+
body: UserDefinedValue
39+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { UserDefinedValue } from '@spec_utils/UserDefinedValue'
21+
22+
export class Response {
23+
/** @codegen_name flamegraph */
24+
body: UserDefinedValue
25+
}

0 commit comments

Comments
 (0)