Skip to content

Commit

Permalink
[Backport 8.x] [OpenAPI] Add more x-model and @ext_doc_id values (#3074)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 23, 2024
1 parent ad31274 commit 1d39a0a
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 7 deletions.
4 changes: 4 additions & 0 deletions docs/overlays/elasticsearch-openapi-overlays.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ 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.
It is provided under license [Attribution-NonCommercial-NoDerivatives 4.0 International](https://creativecommons.org/licenses/by-nc-nd/4.0/).
This documentation contains work-in-progress information for future Elastic Stack releases.
x-doc-license:
name: Attribution-NonCommercial-NoDerivatives 4.0 International
url: 'https://creativecommons.org/licenses/by-nc-nd/4.0/'
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 @@ -1070,6 +1070,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
3 changes: 3 additions & 0 deletions output/openapi/elasticsearch-openapi.json

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

3 changes: 3 additions & 0 deletions output/openapi/elasticsearch-serverless-openapi.json

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

16 changes: 10 additions & 6 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 1d39a0a

Please sign in to comment.