From b2c13a00c152a97cb41193deda8ed9b37fd06796 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 27 Mar 2024 11:43:58 +0100 Subject: [PATCH] Use consistent naming for API when used in a word (#2465) (#2470) * Use consistent naming for API when used in a word * More renaming (cherry picked from commit 071b2f79d37b92150d8ce42e3bd77951aa917f4f) Co-authored-by: Sylvain Wallez --- .../elasticsearch-serverless-openapi.json | 28 +++++++++---------- output/schema/schema.json | 22 +++++++-------- output/schema/validation-errors.json | 2 +- output/typescript/types.ts | 26 ++++++++--------- .../query_api_keys/QueryApiKeysRequest.ts | 6 ++-- .../query_api_keys/QueryApiKeysResponse.ts | 4 +-- .../security/query_api_keys/types.ts | 16 +++++------ 7 files changed, 52 insertions(+), 52 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index dd3a22bd5f..5b8fcdec11 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -20330,7 +20330,7 @@ "description": "The aggregations result, if requested.", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/security.query_api_keys:APIKeyAggregate" + "$ref": "#/components/schemas/security.query_api_keys:ApiKeyAggregate" } } }, @@ -27057,11 +27057,11 @@ "description": "Any aggregations to run over the corpus of returned API keys.\nAggregations and queries work together. Aggregations are computed only on the API keys that match the query.\nThis supports only a subset of aggregation types, namely: `terms`, `range`, `date_range`, `missing`,\n`cardinality`, `value_count`, `composite`, `filter`, and `filters`.\nAdditionally, aggregations only run over the same subset of fields that query works with.", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/security.query_api_keys:APIKeyAggregationContainer" + "$ref": "#/components/schemas/security.query_api_keys:ApiKeyAggregationContainer" } }, "query": { - "$ref": "#/components/schemas/security.query_api_keys:APIKeyQueryContainer" + "$ref": "#/components/schemas/security.query_api_keys:ApiKeyQueryContainer" }, "from": { "description": "Starting document offset.\nBy default, you cannot page through more than 10,000 hits using the from and size parameters.\nTo page through more hits, use the `search_after` parameter.", @@ -57384,7 +57384,7 @@ "type": "boolean" } }, - "security.query_api_keys:APIKeyAggregationContainer": { + "security.query_api_keys:ApiKeyAggregationContainer": { "allOf": [ { "type": "object", @@ -57393,7 +57393,7 @@ "description": "Sub-aggregations for this aggregation.\nOnly applies to bucket aggregations.", "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/security.query_api_keys:APIKeyAggregationContainer" + "$ref": "#/components/schemas/security.query_api_keys:ApiKeyAggregationContainer" } }, "meta": { @@ -57414,10 +57414,10 @@ "$ref": "#/components/schemas/_types.aggregations:DateRangeAggregation" }, "filter": { - "$ref": "#/components/schemas/security.query_api_keys:APIKeyQueryContainer" + "$ref": "#/components/schemas/security.query_api_keys:ApiKeyQueryContainer" }, "filters": { - "$ref": "#/components/schemas/security.query_api_keys:APIKeyFiltersAggregation" + "$ref": "#/components/schemas/security.query_api_keys:ApiKeyFiltersAggregation" }, "missing": { "$ref": "#/components/schemas/_types.aggregations:MissingAggregation" @@ -57437,7 +57437,7 @@ } ] }, - "security.query_api_keys:APIKeyQueryContainer": { + "security.query_api_keys:ApiKeyQueryContainer": { "type": "object", "properties": { "bool": { @@ -57522,7 +57522,7 @@ "minProperties": 1, "maxProperties": 1 }, - "security.query_api_keys:APIKeyFiltersAggregation": { + "security.query_api_keys:ApiKeyFiltersAggregation": { "allOf": [ { "$ref": "#/components/schemas/_types.aggregations:BucketAggregationBase" @@ -57531,7 +57531,7 @@ "type": "object", "properties": { "filters": { - "$ref": "#/components/schemas/_types.aggregations:BucketsAPIKeyQueryContainer" + "$ref": "#/components/schemas/_types.aggregations:BucketsApiKeyQueryContainer" }, "other_bucket": { "description": "Set to `true` to add a bucket to the response which will contain all documents that do not match any of the given filters.", @@ -57549,24 +57549,24 @@ } ] }, - "_types.aggregations:BucketsAPIKeyQueryContainer": { + "_types.aggregations:BucketsApiKeyQueryContainer": { "description": "Aggregation buckets. By default they are returned as an array, but if the aggregation has keys configured for\nthe different buckets, the result is a dictionary.", "oneOf": [ { "type": "object", "additionalProperties": { - "$ref": "#/components/schemas/security.query_api_keys:APIKeyQueryContainer" + "$ref": "#/components/schemas/security.query_api_keys:ApiKeyQueryContainer" } }, { "type": "array", "items": { - "$ref": "#/components/schemas/security.query_api_keys:APIKeyQueryContainer" + "$ref": "#/components/schemas/security.query_api_keys:ApiKeyQueryContainer" } } ] }, - "security.query_api_keys:APIKeyAggregate": { + "security.query_api_keys:ApiKeyAggregate": { "oneOf": [ { "$ref": "#/components/schemas/_types.aggregations:CardinalityAggregate" diff --git a/output/schema/schema.json b/output/schema/schema.json index 2613b842d1..b08f408dfc 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -179106,7 +179106,7 @@ { "kind": "type_alias", "name": { - "name": "APIKeyAggregate", + "name": "ApiKeyAggregate", "namespace": "security.query_api_keys" }, "specLocation": "security/query_api_keys/types.ts#L123-L140", @@ -179214,7 +179214,7 @@ { "kind": "interface", "name": { - "name": "APIKeyAggregationContainer", + "name": "ApiKeyAggregationContainer", "namespace": "security.query_api_keys" }, "properties": [ @@ -179239,7 +179239,7 @@ "value": { "kind": "instance_of", "type": { - "name": "APIKeyAggregationContainer", + "name": "ApiKeyAggregationContainer", "namespace": "security.query_api_keys" } } @@ -179306,7 +179306,7 @@ "type": { "kind": "instance_of", "type": { - "name": "APIKeyQueryContainer", + "name": "ApiKeyQueryContainer", "namespace": "security.query_api_keys" } } @@ -179320,7 +179320,7 @@ "type": { "kind": "instance_of", "type": { - "name": "APIKeyFiltersAggregation", + "name": "ApiKeyFiltersAggregation", "namespace": "security.query_api_keys" } } @@ -179394,7 +179394,7 @@ }, "kind": "interface", "name": { - "name": "APIKeyFiltersAggregation", + "name": "ApiKeyFiltersAggregation", "namespace": "security.query_api_keys" }, "properties": [ @@ -179407,7 +179407,7 @@ { "kind": "instance_of", "type": { - "name": "APIKeyQueryContainer", + "name": "ApiKeyQueryContainer", "namespace": "security.query_api_keys" } } @@ -179463,7 +179463,7 @@ { "kind": "interface", "name": { - "name": "APIKeyQueryContainer", + "name": "ApiKeyQueryContainer", "namespace": "security.query_api_keys" }, "properties": [ @@ -179710,7 +179710,7 @@ "value": { "kind": "instance_of", "type": { - "name": "APIKeyAggregationContainer", + "name": "ApiKeyAggregationContainer", "namespace": "security.query_api_keys" } } @@ -179723,7 +179723,7 @@ "type": { "kind": "instance_of", "type": { - "name": "APIKeyQueryContainer", + "name": "ApiKeyQueryContainer", "namespace": "security.query_api_keys" } } @@ -179878,7 +179878,7 @@ "value": { "kind": "instance_of", "type": { - "name": "APIKeyAggregate", + "name": "ApiKeyAggregate", "namespace": "security.query_api_keys" } } diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 64ce780c66..3ddbd17c7e 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -1311,7 +1311,7 @@ "security.query_api_keys": { "request": [], "response": [ - "type_alias definition security.query_api_keys:APIKeyAggregate / instance_of - Non-leaf type cannot be used here: '_types.aggregations:RangeAggregate'" + "type_alias definition security.query_api_keys:ApiKeyAggregate / instance_of - Non-leaf type cannot be used here: '_types.aggregations:RangeAggregate'" ] }, "security.suggest_user_profiles": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 5f8c100d56..6af1297692 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -16879,31 +16879,31 @@ export interface SecurityPutUserResponse { created: boolean } -export type SecurityQueryApiKeysAPIKeyAggregate = AggregationsCardinalityAggregate | AggregationsValueCountAggregate | AggregationsStringTermsAggregate | AggregationsLongTermsAggregate | AggregationsDoubleTermsAggregate | AggregationsUnmappedTermsAggregate | AggregationsMultiTermsAggregate | AggregationsMissingAggregate | AggregationsFilterAggregate | AggregationsFiltersAggregate | AggregationsRangeAggregate | AggregationsDateRangeAggregate | AggregationsCompositeAggregate +export type SecurityQueryApiKeysApiKeyAggregate = AggregationsCardinalityAggregate | AggregationsValueCountAggregate | AggregationsStringTermsAggregate | AggregationsLongTermsAggregate | AggregationsDoubleTermsAggregate | AggregationsUnmappedTermsAggregate | AggregationsMultiTermsAggregate | AggregationsMissingAggregate | AggregationsFilterAggregate | AggregationsFiltersAggregate | AggregationsRangeAggregate | AggregationsDateRangeAggregate | AggregationsCompositeAggregate -export interface SecurityQueryApiKeysAPIKeyAggregationContainer { - aggregations?: Record - aggs?: Record +export interface SecurityQueryApiKeysApiKeyAggregationContainer { + aggregations?: Record + aggs?: Record meta?: Metadata cardinality?: AggregationsCardinalityAggregation composite?: AggregationsCompositeAggregation date_range?: AggregationsDateRangeAggregation - filter?: SecurityQueryApiKeysAPIKeyQueryContainer - filters?: SecurityQueryApiKeysAPIKeyFiltersAggregation + filter?: SecurityQueryApiKeysApiKeyQueryContainer + filters?: SecurityQueryApiKeysApiKeyFiltersAggregation missing?: AggregationsMissingAggregation range?: AggregationsRangeAggregation terms?: AggregationsTermsAggregation value_count?: AggregationsValueCountAggregation } -export interface SecurityQueryApiKeysAPIKeyFiltersAggregation extends AggregationsBucketAggregationBase { - filters?: AggregationsBuckets +export interface SecurityQueryApiKeysApiKeyFiltersAggregation extends AggregationsBucketAggregationBase { + filters?: AggregationsBuckets other_bucket?: boolean other_bucket_key?: string keyed?: boolean } -export interface SecurityQueryApiKeysAPIKeyQueryContainer { +export interface SecurityQueryApiKeysApiKeyQueryContainer { bool?: QueryDslBoolQuery exists?: QueryDslExistsQuery ids?: QueryDslIdsQuery @@ -16920,9 +16920,9 @@ export interface SecurityQueryApiKeysAPIKeyQueryContainer { export interface SecurityQueryApiKeysRequest extends RequestBase { with_limited_by?: boolean body?: { - aggregations?: Record - aggs?: Record - query?: SecurityQueryApiKeysAPIKeyQueryContainer + aggregations?: Record + aggs?: Record + query?: SecurityQueryApiKeysApiKeyQueryContainer from?: integer sort?: Sort size?: integer @@ -16934,7 +16934,7 @@ export interface SecurityQueryApiKeysResponse { total: integer count: integer api_keys: SecurityApiKey[] - aggregations?: Record + aggregations?: Record } export interface SecuritySamlAuthenticateRequest extends RequestBase { diff --git a/specification/security/query_api_keys/QueryApiKeysRequest.ts b/specification/security/query_api_keys/QueryApiKeysRequest.ts index 7932296838..854450ca8c 100644 --- a/specification/security/query_api_keys/QueryApiKeysRequest.ts +++ b/specification/security/query_api_keys/QueryApiKeysRequest.ts @@ -18,7 +18,7 @@ */ import { Dictionary } from '@spec_utils/Dictionary' -import { APIKeyAggregationContainer, APIKeyQueryContainer } from './types' +import { ApiKeyAggregationContainer, ApiKeyQueryContainer } from './types' import { RequestBase } from '@_types/Base' import { integer } from '@_types/Numeric' import { Sort, SortResults } from '@_types/sort' @@ -49,7 +49,7 @@ export interface Request extends RequestBase { * `cardinality`, `value_count`, `composite`, `filter`, and `filters`. * Additionally, aggregations only run over the same subset of fields that query works with. * @aliases aggs */ - aggregations?: Dictionary + aggregations?: Dictionary /** * A query to filter which API keys to return. * If the query parameter is missing, it is equivalent to a `match_all` query. @@ -58,7 +58,7 @@ export interface Request extends RequestBase { * You can query the following public information associated with an API key: `id`, `type`, `name`, * `creation`, `expiration`, `invalidated`, `invalidation`, `username`, `realm`, and `metadata`. */ - query?: APIKeyQueryContainer + query?: ApiKeyQueryContainer /** * Starting document offset. * By default, you cannot page through more than 10,000 hits using the from and size parameters. diff --git a/specification/security/query_api_keys/QueryApiKeysResponse.ts b/specification/security/query_api_keys/QueryApiKeysResponse.ts index 7f1db59bdd..fc5b7c7619 100644 --- a/specification/security/query_api_keys/QueryApiKeysResponse.ts +++ b/specification/security/query_api_keys/QueryApiKeysResponse.ts @@ -21,7 +21,7 @@ import { ApiKey } from '@security/_types/ApiKey' import { integer } from '@_types/Numeric' import { Dictionary } from '@spec_utils/Dictionary' import { AggregateName } from '@_types/common' -import { APIKeyAggregate } from './types' +import { ApiKeyAggregate } from './types' export class Response { body: { @@ -40,6 +40,6 @@ export class Response { /** * The aggregations result, if requested. */ - aggregations?: Dictionary + aggregations?: Dictionary } } diff --git a/specification/security/query_api_keys/types.ts b/specification/security/query_api_keys/types.ts index 0fdc887910..a0ef7c96e4 100644 --- a/specification/security/query_api_keys/types.ts +++ b/specification/security/query_api_keys/types.ts @@ -65,14 +65,14 @@ import { * @variants container * @non_exhaustive */ -export class APIKeyAggregationContainer { +export class ApiKeyAggregationContainer { /** * Sub-aggregations for this aggregation. * Only applies to bucket aggregations. * @variant container_property * @aliases aggs */ - aggregations?: Dictionary + aggregations?: Dictionary /** * @variant container_property */ @@ -96,12 +96,12 @@ export class APIKeyAggregationContainer { * A single bucket aggregation that narrows the set of documents to those that match a query. * @doc_id search-aggregations-bucket-filter-aggregation */ - filter?: APIKeyQueryContainer + filter?: ApiKeyQueryContainer /** * A multi-bucket aggregation where each bucket contains the documents that match a query. * @doc_id search-aggregations-bucket-filters-aggregation */ - filters?: APIKeyFiltersAggregation + filters?: ApiKeyFiltersAggregation missing?: MissingAggregation /** * A multi-bucket value source based aggregation that enables the user to define a set of ranges - each representing a bucket. @@ -124,7 +124,7 @@ export class APIKeyAggregationContainer { * @variants external * @non_exhaustive */ -export type APIKeyAggregate = +export type ApiKeyAggregate = | CardinalityAggregate | ValueCountAggregate | StringTermsAggregate @@ -143,7 +143,7 @@ export type APIKeyAggregate = * @variants container * @non_exhaustive */ -export class APIKeyQueryContainer { +export class ApiKeyQueryContainer { /** * matches documents matching boolean combinations of other queries. * @doc_id query-dsl-bool-query @@ -205,11 +205,11 @@ export class APIKeyQueryContainer { wildcard?: SingleKeyDictionary } -export class APIKeyFiltersAggregation extends BucketAggregationBase { +export class ApiKeyFiltersAggregation extends BucketAggregationBase { /** * Collection of queries from which to build buckets. */ - filters?: Buckets + filters?: Buckets /** * Set to `true` to add a bucket to the response which will contain all documents that do not match any of the given filters. */