api: align Topology swagger with Segments JSON shape#52358
Merged
thaJeztah merged 2 commits intomoby:masterfrom Apr 19, 2026
Merged
api: align Topology swagger with Segments JSON shape#52358thaJeztah merged 2 commits intomoby:masterfrom
thaJeztah merged 2 commits intomoby:masterfrom
Conversation
Signed-off-by: Nishant Maheshwari <[email protected]>
Contributor
Author
|
OL8 VM integration (non-rootless) failed in .integration-daemon-stop after TestAttachDisconnectLeak; logs show DONE 84 tests then daemon stop / wait errors. integration (rootless) on the same template passed. Looks unrelated to the swagger-only change, could a maintainer re-run the failed job when convenient? |
Contributor
|
Don't we need to change all the |
Apply the same Topology schema fix as api/swagger.yaml to v1.42–v1.54 document snapshots so clients generating from pinned API versions see the correct Segments map shape. Signed-off-by: Nishant Maheshwari <[email protected]> Made-with: Cursor
Contributor
Author
|
@fussybeaver |
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.
Topologyinconsistent with Go implementation #52355Updated the OpenAPI/Swagger definition for Topology in api/swagger.yaml so it matches the JSON produced by the Go type in api/types/volume/cluster_volume.go (Topology with a Segments field of type map[string]string). Previously the spec described a flat object with string values at the top level, which did not match daemon output (for example under ClusterVolume.Info.AccessibleTopology) and broke clients generated from the spec.
Replaced the Topology schema’s root-level additionalProperties: string with an explicit properties.Segments object whose additionalProperties are strings. Existing $ref: "#/definitions/Topology usages (e.g. AccessibleTopology, accessibility requirements) now resolve to the correct shape without further edits.
Inspect api/swagger.yaml → definitions → Topology: it should show a Segments property wrapping the map.
Compare with a real GET /volumes/{name} (or equivalent) response for a cluster volume with CSI topology: each topology entry should be an object with a Segments map, matching the updated schema.
Fix Swagger definition for volume topology so it matches the
SegmentsJSON field returned by the API.