Skip to content

Add versioned Libpod API paths to generated Swagger - #29331

Open
JJordan0C wants to merge 1 commit into
podman-container-tools:mainfrom
JJordan0C:fix/version-libpod-swagger-paths
Open

Add versioned Libpod API paths to generated Swagger#29331
JJordan0C wants to merge 1 commit into
podman-container-tools:mainfrom
JJordan0C:fix/version-libpod-swagger-paths

Conversation

@JJordan0C

Copy link
Copy Markdown

Summary

I came across #15376 and noticed it had been open for quite some time, so I decided to take a look.

This PR updates the generated Swagger specification so that Libpod API paths include the required version prefix.

Specifically, it:

  • rewrites /libpod/... to /v{version}/libpod/...;
  • keeps /libpod/_ping unversioned;
  • reuses a required version path parameter;
  • detects path collisions during generation;
  • adds tests for the transformation.

This only affects Swagger generation and does not change the Podman daemon or API routing.

I hope this approach fits the project and helps address the issue. I’d appreciate any feedback or suggestions.

Fixes: #15376

Checklist

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #15376 in commit message
  • Tests have been added/updated
  • Documentation has been updated (or no additional documentation changes are needed)
  • All commits pass make validatepr
  • Release note entered below

Does this PR introduce a user-facing change?

Generated Swagger documentation now includes the required version prefix for Libpod API endpoints.

Update the generated Swagger specification so that Libpod API paths include the required version prefix. Keep the unversioned ping endpoint unchanged, reuse the version path parameter, and add tests for the path rewriting logic.

Fixes: podman-container-tools#15376
Signed-off-by: JJordan0K <69581081+JJordan0C@users.noreply.github.com>
@github-actions github-actions Bot added the kind/api-change Change to remote API; merits scrutiny label Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/api-change Change to remote API; merits scrutiny

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mismatch between documentation and REST API

1 participant