Skip to content

Enable API-versioning and allow for both v3 and v4 versions.#7802

Open
ggainey wants to merge 1 commit into
pulp:mainfrom
ggainey:v4_api
Open

Enable API-versioning and allow for both v3 and v4 versions.#7802
ggainey wants to merge 1 commit into
pulp:mainfrom
ggainey:v4_api

Conversation

@ggainey

@ggainey ggainey commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

This is a tech-preview PR, and will only "turn on" if the ENABLE_V4_API is set to True in settings.

It will allow urls for /v3/ and /v4/, and reject other versions.

For urlpatterns registered with a /<str:version>/ slug, views will be called with a version= kwarg.

NOTE: To play this game, plugins will need to insure that all views accept **kwargs first, and then update the patterns in their urls.py to include the version-slug.

See the /status/ view and serializer(s) for an example of how to respond based on the incoming request.

NOTE to implementers: existing tests must pass without changes whether the ENABLE flag is True or False. If that isn't the case - you're doing something wrong.

closes #6462

@ggainey ggainey force-pushed the v4_api branch 2 times, most recently from 75e4f88 to fcdcf5b Compare June 16, 2026 19:29
@ggainey ggainey force-pushed the v4_api branch 2 times, most recently from c88e6ee to d38417a Compare June 16, 2026 19:33
This is a tech-preview PR, and will only "turn on" if the
ENABLE_V4_API is set to True in settings.

It will allow urls for /v3/ and /v4/, and reject other versions.

For urlpatterns registered with a `/<str:version>/` slug, views
will be called with a `version=` kwarg.

NOTE: To play this game, plugins will need to insure that all
views accept `**kwargs` first, and then update the patterns in their
`urls.py` to include the version-slug.

See the `/status/` view and serializer(s) for an example of
how to respond based on the incoming request.

NOTE to implementers: **existing tests must pass without changes**
whether the ENABLE flag is True or False. If that isn't the case -
you're doing something wrong.

closes pulp#6462
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.

API namespacing

1 participant