Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix core schemas #777

Merged
merged 2 commits into from
Jan 9, 2025
Merged

Conversation

Xtansia
Copy link
Collaborator

@Xtansia Xtansia commented Jan 9, 2025

Description

Fix core schemas

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Thomas Farr <[email protected]>
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Changes Analysis

Commit SHA: 3692cdf
Comparing To SHA: c1651ec

API Changes

Summary

├─┬Paths
│ ├─┬/{index}/_mget
│ │ ├─┬GET
│ │ │ └──Parameters
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/{index}/_rank_eval
│ │ ├─┬GET
│ │ │ ├──Parameters
│ │ │ └─┬Responses
│ │ │   └─┬200
│ │ │     └─┬application/json
│ │ │       └─┬Schema
│ │ │         └─┬failures
│ │ │           └──[🔀] additionalProperties (32097:39)❌ 
│ │ └─┬POST
│ │   ├──Parameters
│ │   └─┬Responses
│ │     └─┬200
│ │       └─┬application/json
│ │         └─┬Schema
│ │           └─┬failures
│ │             └──[🔀] additionalProperties (32097:39)❌ 
│ ├─┬/{index}/_search/template
│ │ ├─┬GET
│ │ │ └──Parameters
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/_search/point_in_time
│ │ └─┬DELETE
│ │   └─┬Responses
│ │     └─┬200
│ │       └─┬application/json
│ │         └─┬Schema
│ │           └─┬pits
│ │             └─┬Schema
│ │               └──[🔀] $ref (45472:13)❌ 
│ ├─┬/{index}/_search/point_in_time
│ │ └─┬POST
│ │   └─┬Responses
│ │     └─┬200
│ │       └─┬application/json
│ │         └─┬Schema
│ │           └─┬_shards
│ │             └──[🔀] $ref (35605:13)❌ 
│ ├─┬/_search_shards
│ │ ├─┬GET
│ │ │ └──[➖] requestBody (28872:7)❌ 
│ │ └─┬POST
│ │   └──[➖] requestBody (28872:7)❌ 
│ ├─┬/_render/template/{id}
│ │ ├─┬GET
│ │ │ └─┬Responses
│ │ │   └─┬200
│ │ │     └─┬application/json
│ │ │       └─┬Schema
│ │ │         └─┬template_output
│ │ │           └──[🔀] additionalProperties (32157:39)❌ 
│ │ └─┬POST
│ │   └─┬Responses
│ │     └─┬200
│ │       └─┬application/json
│ │         └─┬Schema
│ │           └─┬template_output
│ │             └──[🔀] additionalProperties (32157:39)❌ 
│ ├─┬/{index}/_search_shards
│ │ ├─┬GET
│ │ │ └──[➖] requestBody (28872:7)❌ 
│ │ └─┬POST
│ │   └──[➖] requestBody (28872:7)❌ 
│ ├─┬/_search/template
│ │ ├─┬GET
│ │ │ └──Parameters
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/{index}/_doc/{id}
│ │ ├─┬GET
│ │ │ └──Parameters
│ │ └─┬HEAD
│ │   └──Parameters
│ ├─┬/_mget
│ │ ├─┬GET
│ │ │ └──Parameters
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/_bulk/stream
│ │ ├─┬PUT
│ │ │ └──Parameters
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/{index}/_update/{id}
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/_rank_eval
│ │ ├─┬GET
│ │ │ ├──Parameters
│ │ │ └─┬Responses
│ │ │   └─┬200
│ │ │     └─┬application/json
│ │ │       └─┬Schema
│ │ │         └─┬failures
│ │ │           └──[🔀] additionalProperties (32097:39)❌ 
│ │ └─┬POST
│ │   ├──Parameters
│ │   └─┬Responses
│ │     └─┬200
│ │       └─┬application/json
│ │         └─┬Schema
│ │           └─┬failures
│ │             └──[🔀] additionalProperties (32097:39)❌ 
│ ├─┬/_search
│ │ ├─┬GET
│ │ │ ├──Parameters
│ │ │ └──Parameters
│ │ └─┬POST
│ │   ├──Parameters
│ │   └──Parameters
│ ├─┬/_bulk
│ │ ├─┬PUT
│ │ │ └──Parameters
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/_search/point_in_time/_all
│ │ ├─┬GET
│ │ │ └─┬Responses
│ │ │   └─┬200
│ │ │     └─┬application/json
│ │ │       └─┬Schema
│ │ │         └─┬pits
│ │ │           └─┬Schema
│ │ │             └──[🔀] $ref (45479:13)❌ 
│ │ └─┬DELETE
│ │   └─┬Responses
│ │     └─┬200
│ │       └─┬application/json
│ │         └─┬Schema
│ │           └─┬pits
│ │             └─┬Schema
│ │               └──[🔀] $ref (45472:13)❌ 
│ ├─┬/_reindex
│ │ └─┬POST
│ │   ├──[➕] parameters (24623:13)❌ 
│ │   └──Parameters
│ ├─┬/{index}/_msearch
│ │ ├─┬GET
│ │ │ └──Parameters
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/_render/template
│ │ ├─┬GET
│ │ │ └─┬Responses
│ │ │   └─┬200
│ │ │     └─┬application/json
│ │ │       └─┬Schema
│ │ │         └─┬template_output
│ │ │           └──[🔀] additionalProperties (32157:39)❌ 
│ │ └─┬POST
│ │   └─┬Responses
│ │     └─┬200
│ │       └─┬application/json
│ │         └─┬Schema
│ │           └─┬template_output
│ │             └──[🔀] additionalProperties (32157:39)❌ 
│ ├─┬/{index}/_search
│ │ ├─┬GET
│ │ │ ├──Parameters
│ │ │ └──Parameters
│ │ └─┬POST
│ │   ├──Parameters
│ │   └──Parameters
│ ├─┬/_msearch/template
│ │ ├─┬GET
│ │ │ └──Parameters
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/{index}/_msearch/template
│ │ ├─┬GET
│ │ │ └──Parameters
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/_msearch
│ │ ├─┬GET
│ │ │ └──Parameters
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/{index}/_explain/{id}
│ │ ├─┬GET
│ │ │ └──Parameters
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/{index}/_delete_by_query
│ │ └─┬POST
│ │   ├─┬Parameters
│ │   │ └─┬Schema
│ │   │   └──[🔀] $ref (46735:20)❌ 
│ │   ├──Parameters
│ │   └──Parameters
│ ├─┬/{index}/_update_by_query
│ │ └─┬POST
│ │   ├──Parameters
│ │   ├─┬Parameters
│ │   │ └─┬Schema
│ │   │   └──[🔀] $ref (46735:20)❌ 
│ │   └──Parameters
│ ├─┬/{index}/_bulk
│ │ ├─┬PUT
│ │ │ └──Parameters
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/{index}/_source/{id}
│ │ ├─┬GET
│ │ │ └──Parameters
│ │ └─┬HEAD
│ │   └──Parameters
│ └─┬/{index}/_bulk/stream
│   ├─┬PUT
│   │ └──Parameters
│   └─┬POST
│     └──Parameters
└─┬Components
  ├──[➖] requestBodies (28872:7)❌ 
  ├──[➕] parameters (24622:7)
  ├──[➖] schemas (44923:7)❌ 
  ├──[➖] schemas (44930:7)❌ 
  ├──[➖] schemas (35022:7)❌ 
  ├──[➖] schemas (44941:7)❌ 
  ├──[➖] schemas (44948:7)❌ 
  ├──[➕] schemas (45472:7)
  ├──[➕] schemas (45479:7)
  ├─┬_core.search___SourceConfigParam
  │ ├─┬ONEOF
  │ │ └──[🔀] $ref (46739:11)❌ 
  │ └─┬ONEOF
  │   └──[🔀] $ref (34138:9)❌ 
  ├─┬_core.field_caps___FieldCapability
  │ └─┬meta
  │   └──[🔀] $ref (45066:11)❌ 
  ├─┬_core.reindex_rethrottle___ReindexStatus
  │ ├─┬batches
  │ │ ├──[🔀] type (45679:17)❌ 
  │ │ └──[➕] format (45680:19)❌ 
  │ ├─┬requests_per_second
  │ │ └──[➕] format (45696:19)❌ 
  │ ├─┬noops
  │ │ ├──[🔀] type (45691:17)❌ 
  │ │ └──[➕] format (45692:19)❌ 
  │ ├─┬deleted
  │ │ ├──[🔀] type (45687:17)❌ 
  │ │ └──[➕] format (45688:19)❌ 
  │ ├─┬version_conflicts
  │ │ ├──[🔀] type (45717:17)❌ 
  │ │ └──[➕] format (45718:19)❌ 
  │ ├─┬created
  │ │ ├──[🔀] type (45683:17)❌ 
  │ │ └──[➕] format (45684:19)❌ 
  │ ├─┬updated
  │ │ ├──[🔀] type (45713:17)❌ 
  │ │ └──[➕] format (45714:19)❌ 
  │ └─┬total
  │   ├──[🔀] type (45709:17)❌ 
  │   └──[➕] format (45710:19)❌ 
  ├─┬_common___SlicedScroll
  │ └─┬id
  │   └──[🔀] $ref (35631:11)❌ 
  ├─┬_core.mtermvectors___TermVectorsResult
  │ └─┬took
  │   ├──[🔀] type (45456:17)❌ 
  │   └──[➕] format (45457:19)❌ 
  ├─┬_common___SearchType
  │ ├──[➖] enum (35507:11)❌ 
  │ ├──[➖] enum (35506:11)❌ 
  │ ├──[➖] type (35504:13)❌ 
  │ ├──[➕] oneOf (35450:11)
  │ └──[➕] oneOf (35447:11)
  ├─┬_core.mtermvectors___Operation
  │ └─┬doc
  │   └──[➖] type (45506:17)❌ 
  ├─┬_core.termvectors___Token
  │ ├─┬start_offset
  │ │ ├──[🔀] type (46938:17)❌ 
  │ │ └──[➕] format (46939:19)❌ 
  │ ├─┬end_offset
  │ │ ├──[🔀] type (46930:17)❌ 
  │ │ └──[➕] format (46931:19)❌ 
  │ └─┬position
  │   ├──[🔀] type (46935:17)❌ 
  │   └──[➕] format (46936:19)❌ 
  ├─┬_core.rank_eval___RankEvalMetricRatingThreshold
  │ └─┬ALLOF
  │   └─┬relevant_rating_threshold
  │     ├──[🔀] type (45616:21)❌ 
  │     └──[➕] format (45617:23)❌ 
  ├─┬_core.termvectors___Filter
  │ ├─┬max_term_freq
  │ │ ├──[🔀] type (46870:17)❌ 
  │ │ └──[➕] format (46871:19)❌ 
  │ ├─┬max_doc_freq
  │ │ ├──[🔀] type (46860:17)❌ 
  │ │ └──[➕] format (46861:19)❌ 
  │ ├─┬min_word_length
  │ │ ├──[🔀] type (46892:17)❌ 
  │ │ └──[➕] format (46893:19)❌ 
  │ ├─┬min_doc_freq
  │ │ ├──[🔀] type (46881:17)❌ 
  │ │ └──[➕] format (46882:19)❌ 
  │ ├─┬max_num_terms
  │ │ ├──[🔀] type (46864:17)❌ 
  │ │ └──[➕] format (46865:19)❌ 
  │ ├─┬min_term_freq
  │ │ ├──[🔀] type (46885:17)❌ 
  │ │ └──[➕] format (46886:19)❌ 
  │ └─┬max_word_length
  │   ├──[🔀] type (46877:17)❌ 
  │   └──[➕] format (46878:19)❌ 
  ├─┬_core.rank_eval___RankEvalMetricExpectedReciprocalRank
  │ ├─┬ALLOF
  │ │ └──[🔀] $ref (45544:13)❌ 
  │ └─┬ALLOF
  │   └──[🔀] $ref (45589:11)❌ 
  ├─┬_core.rank_eval___RankEvalHitItem
  │ └─┬rating
  │   ├──[🔀] type (45526:17)❌ 
  │   └──[➕] format (45527:19)❌ 
  ├─┬_core.rank_eval___DocumentRating
  │ └─┬rating
  │   ├──[🔀] type (45498:17)❌ 
  │   └──[➕] format (45499:19)❌ 
  ├─┬_core.termvectors___FieldStatistics
  │ ├─┬sum_doc_freq
  │ │ ├──[🔀] type (46844:17)❌ 
  │ │ └──[➕] format (46845:19)❌ 
  │ ├─┬sum_ttf
  │ │ ├──[🔀] type (46847:17)❌ 
  │ │ └──[➕] format (46848:19)❌ 
  │ └─┬doc_count
  │   ├──[🔀] type (46841:17)❌ 
  │   └──[➕] format (46842:19)❌ 
  ├─┬_core.termvectors___TermVector
  │ └──[➖] required (46965:11)❌ 
  ├─┬_core.rank_eval___RankEvalHit
  │ └─┬_score
  │   └──[➕] format (45513:19)❌ 
  ├─┬_common___NodeShard
  │ ├──[➖] properties (34784:9)❌ 
  │ └─┬shard
  │   ├──[🔀] type (34717:17)❌ 
  │   └──[➕] format (34718:19)❌ 
  ├─┬_common___Slices
  │ └─┬ONEOF
  │   ├──[🔀] type (35643:17)❌ 
  │   ├──[➕] title (35642:18)
  │   └──[➕] format (35644:19)❌ 
  ├─┬_core.rank_eval___RankEvalRequestItem
  │ └─┬params
  │   └──[🔀] additionalProperties (45649:33)❌ 
  ├─┬_core.rank_eval___RankEvalQuery
  │ └─┬size
  │   ├──[🔀] type (45628:17)❌ 
  │   └──[➕] format (45629:19)❌ 
  ├─┬_core.termvectors___Term
  │ ├─┬doc_freq
  │ │ ├──[🔀] type (46898:17)❌ 
  │ │ └──[➕] format (46899:19)❌ 
  │ ├─┬score
  │ │ └──[➕] format (46902:19)❌ 
  │ ├─┬ttf
  │ │ ├──[🔀] type (46911:17)❌ 
  │ │ └──[➕] format (46912:19)❌ 
  │ └─┬term_freq
  │   ├──[🔀] type (46904:17)❌ 
  │   └──[➕] format (46905:19)❌ 
  ├─┬_core.reindex_rethrottle___ReindexTask
  │ └─┬id
  │   ├──[🔀] type (45743:17)❌ 
  │   └──[➕] format (45744:19)❌ 
  ├─┬_core.reindex___Source
  │ └─┬size
  │   ├──[🔀] type (45819:17)❌ 
  │   └──[➕] format (45820:19)❌ 
  ├─┬_core.rank_eval___RankEvalMetricDetail
  │ ├─┬metric_score
  │ │ └──[➕] format (45556:19)❌ 
  │ └─┬metric_details
  │   └─┬Schema
  │     └──[🔀] additionalProperties (45572:35)❌ 
  └─┬_core.rank_eval___RankEvalMetricBase
    └─┬k
      ├──[🔀] type (45548:17)❌ 
      └──[➕] format (45549:19)❌ 

Document Element Total Changes Breaking Changes
paths 19 19
components 96 94
  • BREAKING Changes: 113 out of 115
  • Modifications: 55
  • Removals: 16
  • Additions: 44
  • Breaking Removals: 16
  • Breaking Modifications: 55
  • Breaking Additions: 38

Report

The full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/12699531918/artifacts/2410030089

API Coverage

Before After Δ
Covered (%) 643 (62.98 %) 643 (62.98 %) 0 (0 %)
Uncovered (%) 378 (37.02 %) 378 (37.02 %) 0 (0 %)
Unknown 43 43 0

dblock
dblock previously approved these changes Jan 9, 2025
Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some failing tests, otherwise 👏

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is /_search_shards test fixed? I see it removed. I mean, it worked before, no?

Copy link
Contributor

github-actions bot commented Jan 9, 2025

Spec Test Coverage Analysis

Total Tested
573 570 (99.48 %)

@Xtansia
Copy link
Collaborator Author

Xtansia commented Jan 9, 2025

How is /_search_shards test fixed? I see it removed. I mean, it worked before, no?

/_search_shards doesn't accept a request body, OS is just ignoring it. So it was "succeeding" but doing nothing different to the body-less test before it.

https://github.com/opensearch-project/OpenSearch/blob/main/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestClusterSearchShardsAction.java#L77-L85

Even ES 8 doesn't support a request body on /_search_shards so I'm not sure where the confusion came from that led to it being spec'd as such

@Xtansia Xtansia requested a review from dblock January 9, 2025 22:21
@dblock dblock merged commit 5177c0a into opensearch-project:main Jan 9, 2025
30 checks passed
@Xtansia Xtansia deleted the fix/core-schemas branch January 9, 2025 22:52
@nathaliellenaa nathaliellenaa mentioned this pull request Jan 10, 2025
4 tasks
@dblock
Copy link
Member

dblock commented Jan 11, 2025

Re-add a test for POST, #779 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants