Skip to content

Commit

Permalink
[Backport 8.16] [OpenAPI] Add more x-model and @ext_doc_id values (#3075
Browse files Browse the repository at this point in the history
)
  • Loading branch information
github-actions[bot] authored Oct 23, 2024
1 parent 03366ee commit 2ab4471
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 6 deletions.
2 changes: 2 additions & 0 deletions docs/overlays/elasticsearch-openapi-overlays.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ actions:
update:
title: Elasticsearch API
description: >
Elasticsearch provides REST APIs that are used by the UI components and can be called directly to configure and access Elasticsearch features.
## Documentation source and versions
This documentation is derived from the `8.x` branch of the [elasticsearch-specification](https://github.com/elastic/elasticsearch-specification) repository.
Expand Down
11 changes: 11 additions & 0 deletions docs/overlays/elasticsearch-shared-overlays.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,17 @@ actions:
externalDocs:
url: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html
description: Query DSL
- target: "$.components['schemas']['_global.search._types:FieldCollapse']"
description: Add x-model and externalDocs
update:
x-model: true
externalDocs:
url: https://www.elastic.co/guide/en/elasticsearch/reference/master/collapse-search-results.html
- target: "$.components['schemas']['_global.msearch:MultisearchBody'].properties"
description: Add x-model
update:
aggregations:
x-model: true
# Examples
- target: "$.components['requestBodies']['async_search.submit']"
description: "Add example for asynch search submit request"
Expand Down
13 changes: 8 additions & 5 deletions output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions specification/_doc_ids/table.csv
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ cluster,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster
common-options,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/common-options.html
community-id-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/community-id-processor.html
connector-sync-job-cancel,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cancel-connector-sync-job-api.html
collapse-search-results,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/collapse-search-results.html
connector-sync-job-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-connector-sync-job-api.html
connector-sync-job-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-connector-sync-job-api.html
connector-sync-job-post,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/create-connector-sync-job-api.html
Expand Down
5 changes: 4 additions & 1 deletion specification/_global/msearch/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ export class MultisearchHeader {

// We should keep this in sync with the normal search request body.
export class MultisearchBody {
/** @aliases aggs */ // ES uses "aggregations" in serialization
/**
* @aliases aggs
* @ext_doc_id search-aggregations
*/ // ES uses "aggregations" in serialization
aggregations?: Dictionary<string, AggregationContainer>
collapse?: FieldCollapse
/**
Expand Down
3 changes: 3 additions & 0 deletions specification/_global/search/_types/FieldCollapse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import { Field } from '@_types/common'
import { integer } from '@_types/Numeric'
import { InnerHits } from './hits'

/**
* @ext_doc_id collapse-search-results
*/
export class FieldCollapse {
/**
* The field to collapse the result set on
Expand Down

0 comments on commit 2ab4471

Please sign in to comment.