Remove x-distributions-excluded annotations from spec (Phase 2) - #1222
Draft
Hailong-am wants to merge 3 commits into
Draft
Remove x-distributions-excluded annotations from spec (Phase 2)#1222Hailong-am wants to merge 3 commits into
Hailong-am wants to merge 3 commits into
Conversation
Distribution-specific API filtering is now handled by OpenAPI Overlay files (introduced in opensearch-project#1218). This removes the inline annotations and the distribution filtering logic that processed them. Spec changes: - Remove all 89 x-distributions-excluded annotations from 4 files: security.yaml (82), indices.yaml (5), _core.yaml (1), cat.yaml (1) Tooling changes: - OpenApiVersionExtractor: remove target_distribution constructor param, #exclude_per_distribution(), and #remove_keys_not_matching_distribution() - types.ts: remove x-distributions-included/excluded from OperationSpec - Linter: remove distribution keys from OperationGroup.OP_PRIORITY - Schema validators: remove distribution keys from IGNORED_KEYS Test changes: - Update extractor tests to remove distribution param - Regenerate expected YAML fixtures Ref: opensearch-project#1183 Signed-off-by: Hailong Cui <ihailong@amazon.com>
Hailong-am
requested review from
Tokesh,
VachaShah,
Xtansia,
aabeshov,
harshavamsi,
karenyrx,
lucy66hw,
sachetalva and
sean-
as code owners
September 1, 2026 02:45
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1222 +/- ##
==========================================
- Coverage 85.52% 85.44% -0.09%
==========================================
Files 61 61
Lines 2156 2143 -13
Branches 566 562 -4
==========================================
- Hits 1844 1831 -13
Misses 311 311
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…on filtering Replace x-distributions-excluded/included documentation with references to the overlays/ directory and OpenAPI Overlay specification. - DEVELOPER_GUIDE.md: replace x-distributions-* extension docs with a Distribution-Specific API Filtering section pointing to overlays/ - TESTING_GUIDE.md: remove spec annotation examples, keep test story distributions (included/excluded) which are a separate concept Signed-off-by: Hailong Cui <ihailong@amazon.com>
- MergedOpenApiSpec: remove target_distribution constructor param (distribution filtering is no longer done at spec level) - test.ts: remove distribution param from MergedOpenApiSpec constructor - Remove distribution-specific response entries and component definitions from merger and tester test fixture YAML files - Remove distribution-specific test cases (oracle-managed, amazon-serverless) from MergedOpenApiSpec.test.ts - Update expected response keys and regenerate extractor fixtures Test story distributions (tests/*.yaml) are unaffected — those are test-level filtering, a separate concept from spec-level annotations. Signed-off-by: Hailong Cui <ihailong@amazon.com>
Hailong-am
marked this pull request as draft
September 1, 2026 03:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removes all
x-distributions-excludedinline annotations from the OpenAPI spec source files and the distribution filtering logic fromOpenApiVersionExtractor. Distribution-specific API filtering is now handled by OpenAPI Overlay files (Phase 1, #1218).Depends on #1218 — should be merged after Phase 1 lands.
What changed
Spec YAML (89 annotations removed from 4 files):
security.yaml: 82 removedindices.yaml: 5 removed_core.yaml: 1 removedcat.yaml: 1 removedTooling:
OpenApiVersionExtractor: removedtarget_distributionparam,#exclude_per_distribution(),#remove_keys_not_matching_distribution()types.ts: removedx-distributions-included/x-distributions-excludedfromOperationSpecOperationGroup.OP_PRIORITY: removed distribution keysSchemasValidator,SchemaValidator): removed distribution keys fromIGNORED_KEYSTests:
What is NOT changed
distributions(for test filtering) — separate concept, staysx-version-added/x-version-removedversion filtering — staysRef: #1183
Check List
--signoffBy 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.