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

[Docs] Update common schema descriptions #602

Merged
merged 17 commits into from
Oct 8, 2024

Conversation

Naarcha-AWS
Copy link
Contributor

Updates all common schema descriptions. Would like to have our editor look at this PR before merging, Will remove from draft mode upon his approval.

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.

Copy link
Contributor

github-actions bot commented Oct 7, 2024

Changes Analysis

Commit SHA: 630cdf1
Comparing To SHA: 4d74a49

API Changes

Summary

├─┬Paths
│ ├─┬/{index}/_search
│ │ ├─┬GET
│ │ │ └──Parameters
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/{index}/_update_by_query
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/_search
│ │ ├─┬GET
│ │ │ └──Parameters
│ │ └─┬POST
│ │   └──Parameters
│ ├─┬/_reindex
│ │ └─┬POST
│ │   └──Parameters
│ └─┬/{index}/_delete_by_query
│   └─┬POST
│     └──Parameters
└─┬Components
  ├─┬_common:NodeRole
  │ └─┬ONEOF
  │   └─┬Extensions
  │     └──[🔀] x-deprecation-message (30933:34)
  ├─┬_common:QueryCacheStats
  │ ├─┬cache_count
  │ │ └──[🔀] description (31116:24)
  │ ├─┬hit_count
  │ │ └──[🔀] description (31127:24)
  │ ├─┬miss_count
  │ │ └──[🔀] description (31135:24)
  │ ├─┬evictions
  │ │ └──[🔀] description (31124:24)
  │ ├─┬total_count
  │ │ └──[🔀] description (31138:24)
  │ └─┬cache_size
  │   └──[🔀] description (31121:24)
  ├─┬_common:Slices
  │ └──[🔀] description (31816:20)
  ├─┬_common:KnnField
  │ ├─┬boost
  │ │ └──[🔀] description (30756:24)
  │ ├─┬max_distance
  │ │ └──[🔀] description (30745:24)
  │ ├─┬k
  │ │ └──[🔀] description (30738:24)
  │ ├─┬filter
  │ │ └──[🔀] description (30749:24)
  │ └─┬min_score
  │   └──[🔀] description (30741:24)
  ├─┬_common:UnitMillis
  │ └──[🔀] description (32062:20)
  ├─┬_common:ScriptBase
  │ └─┬params
  │   └──[🔀] description (31474:24)
  ├─┬_common:Stringifiedinteger
  │ └──[🔀] description (31939:20)
  ├─┬_common:DocStatus
  │ └──[🔀] description (30256:20)
  ├─┬_common:Stringifiedboolean
  │ └──[🔀] description (31909:20)
  ├─┬_common:XyLocation
  │ └──[🔀] description (32183:20)
  ├─┬_common:RrfRank
  │ ├─┬ALLOF
  │ │ └──[🔀] $ref (31153:13)❌ 
  │ └─┬ALLOF
  │   └──[🔀] $ref (31446:11)❌ 
  ├─┬_common:GeoHashPrecision
  │ └──[🔀] description (30469:20)
  ├─┬_common:PipeSeparatedFlagsSimpleQueryStringFlag
  │ └──[🔀] description (31067:20)
  ├─┬_common:StringifiedEpochTimeUnitMillis
  │ └──[🔀] description (31919:20)
  ├─┬_common:GeoBounds
  │ └──[🔀] description (30426:20)
  ├─┬_common:ErrorCause
  │ ├─┬stack_trace
  │ │ └──[🔀] description (30302:24)
  │ ├─┬reason
  │ │ └──[🔀] description (30299:24)
  │ ├─┬type
  │ │ └──[🔀] description (30296:24)
  │ └─┬Schema
  │   └──[🔀] description (30318:22)
  ├─┬_common:SearchStats
  │ ├─┬concurrent_query_current
  │ │ └──[🔀] description (31569:24)
  │ ├─┬concurrent_query_total
  │ │ └──[🔀] description (31561:24)
  │ ├─┬fetch_current
  │ │ └──[🔀] description (31575:24)
  │ ├─┬query_current
  │ │ └──[🔀] description (31549:24)
  │ ├─┬point_in_time_total
  │ │ └──[🔀] description (31599:24)
  │ ├─┬suggest_current
  │ │ └──[🔀] description (31610:24)
  │ ├─┬point_in_time_current
  │ │ └──[🔀] description (31607:24)
  │ └─┬request
  │   └──[🔀] description (31625:24)
  ├─┬_common:GeoLine
  │ └─┬coordinates
  │   └──[🔀] description (30483:24)
  ├─┬_common:BulkByScrollTaskStatus
  │ ├─┬batches
  │ │ └──[🔀] description (30007:24)
  │ ├─┬updated
  │ │ └──[🔀] description (29995:24)
  │ ├─┬requests_per_second
  │ │ └──[🔀] description (30025:24)
  │ └─┬version_conflicts
  │   └──[🔀] description (30011:24)
  ├─┬_common:DateTime
  │ └──[🔀] description (30196:20)
  ├─┬_common:StringifiedVersionNumber
  │ └──[🔀] description (31949:20)
  ├─┬_common:DurationLarge
  │ └──[🔀] description (30276:20)
  ├─┬_common:Field
  │ └──[🔀] description (30353:20)
  ├─┬_common:SegmentsStats
  │ ├─┬max_unsafe_auto_id_timestamp
  │ │ └──[🔀] description (31694:24)
  │ └─┬count
  │   └──[🔀] description (31667:24)
  ├─┬_common:RemoteStoreStats
  │ └──[🔀] description (31232:20)
  ├─┬_common:StringifiedEpochTimeUnitSeconds
  │ └──[🔀] description (31929:20)
  ├─┬_common:MinimumShouldMatch
  │ └──[🔀] description (30842:20)
  ├─┬_common:NodeStatistics
  │ ├─┬failed
  │ │ └──[🔀] description (30991:24)
  │ ├─┬successful
  │ │ └──[🔀] description (30988:24)
  │ └─┬total
  │   └──[🔀] description (30985:24)
  ├─┬_common:DocStats
  │ ├─┬count
  │ │ └──[🔀] description (30243:24)
  │ └─┬deleted
  │   └──[🔀] description (30248:24)
  ├─┬_common:Void
  │ └──[🔀] description (32090:20)
  └─┬_common:GeoLocation
    └──[🔀] description (30493:20)

Document Element Total Changes Breaking Changes
paths 0 0
components 58 4
  • BREAKING Changes: 4 out of 58
  • Modifications: 58
  • Breaking Modifications: 2

Report

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

API Coverage

Before After Δ
Covered (%) 588 (57.59 %) 588 (57.59 %) 0 (0 %)
Uncovered (%) 433 (42.41 %) 433 (42.41 %) 0 (0 %)
Unknown 29 29 0

Copy link
Contributor

github-actions bot commented Oct 7, 2024

Spec Test Coverage Analysis

Total Tested
504 303 (60.12 %)

Signed-off-by: Archer <[email protected]>
@Naarcha-AWS
Copy link
Contributor Author

Waiting on our editor @natebower to review this before we merge.

Copy link
Contributor

@natebower natebower left a comment

Choose a reason for hiding this comment

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

@Naarcha-AWS Please see my comments and changes and tag me for a reread and approval once addressed. Thanks!

spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
@dblock dblock added the skip-changelog No need to update CHANGELOG. label Oct 7, 2024
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
Naarcha-AWS and others added 4 commits October 7, 2024 10:25
Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: Archer <[email protected]>
Signed-off-by: Archer <[email protected]>
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
@Naarcha-AWS
Copy link
Contributor Author

@natebower: Addressed your comments. Let me know if I missed anything.

Copy link
Contributor

@natebower natebower left a comment

Choose a reason for hiding this comment

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

@Naarcha-AWS Final changes

spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
spec/schemas/_common.yaml Outdated Show resolved Hide resolved
Naarcha-AWS and others added 2 commits October 7, 2024 10:54
Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Copy link
Contributor

@natebower natebower left a comment

Choose a reason for hiding this comment

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

@Naarcha-AWS LGTM!

@Naarcha-AWS
Copy link
Contributor Author

This is now ready for maintainer review and can be merged.

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.

Found one more "AS" capitalized.

Should we be using |- that I think folds without a space? I am worried the extra space gets stripped accidentally. Maybe > is the right(er) one?

spec/schemas/_common.yaml Show resolved Hide resolved
spec/schemas/_common.yaml Show resolved Hide resolved
@@ -802,8 +802,8 @@ components:
type: string
StringifiedEpochTimeUnitSeconds:
description: |-
Some APIs will return values such as numbers also as a string (notably epoch timestamps). This behavior
is used to capture this behavior while keeping the semantics of the field type.
Certain APIs may return values, including numbers such as epoch timestamps, as strings. This setting captures
Copy link
Member

Choose a reason for hiding this comment

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

Is this right, or should it be | and not |-?

Suggested change
Certain APIs may return values, including numbers such as epoch timestamps, as strings. This setting captures
Certain APIs may return values, including numbers such as epoch timestamps, as strings. This setting captures

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like other multi-line descriptions use |-, see line 200.

Copy link
Member

Choose a reason for hiding this comment

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

  1. Make sure end of lines don't have that extra space.
  2. Make sure |- folds by adding a space?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can do. Did some additional digging into this and most OpenAPI specs use a single line |, even for multiline descriptions. I found this article that describes formatting options for descriptions: https://www.baeldung.com/swagger-format-descriptions#yaml-vs-json-formatting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated all |- to |.

Naarcha-AWS and others added 3 commits October 7, 2024 15:17
Co-authored-by: Daniel (dB.) Doubrovkine <[email protected]>
Signed-off-by: Naarcha-AWS <[email protected]>
Signed-off-by: Archer <[email protected]>
@Naarcha-AWS
Copy link
Contributor Author

Looks like updating the pipes caused the linter to error. This was true when trying > breaks with a colon locally. I reverted the scalar pipes back to |- and that fixed the test.

@dblock dblock merged commit 6845fc7 into opensearch-project:main Oct 8, 2024
18 checks passed
@Naarcha-AWS Naarcha-AWS deleted the core-descriptions branch October 8, 2024 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog No need to update CHANGELOG.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants