X Tutup
Skip to content

Migrate partials endpoint from querystring-based routing to path-based routing#11828

Merged
jimchamp merged 1 commit intomasterfrom
refactor/change-partials-url-format
Feb 7, 2026
Merged

Migrate partials endpoint from querystring-based routing to path-based routing#11828
jimchamp merged 1 commit intomasterfrom
refactor/change-partials-url-format

Conversation

@RayBB
Copy link
Collaborator

@RayBB RayBB commented Feb 6, 2026

Migrate partials endpoint from querystring-based routing to path-based routing

This PR updates the partials endpoint so requests use a path segment for the component name, e.g. /partials/AffiliateLinks.json, instead of the legacy querystring format /partials.json?_component=AffiliateLinks&....

This is an API change, but we’re updating the only known consumer at the same time. Partials are intended for internal use (not public/external consumers), so the risk of breaking unknown clients should be low.

Why this change?
FastAPI requires routes and parameters to be defined more explicitly up front. Using a path-based component name keeps the FastAPI migration cleaner and avoids an increasingly messy set of query-parameter permutations in the current migration draft (#11773).

Technical

Testing

Screenshot

Stakeholders

@RayBB
Copy link
Collaborator Author

RayBB commented Feb 6, 2026

@jimchamp I think you've driven a lot of the partials code so I'd especially like your input on this one.

@RayBB RayBB changed the title update partials endpoint format Migrate partials endpoint from querystring-based routing to path-based routing Feb 6, 2026
@jimchamp
Copy link
Collaborator

jimchamp commented Feb 7, 2026

This all seems fine to me (rslgtm).

At one point, I think that we were passing an array of positional arguments and a json blob of keyword arguments that would be passed through to the template that was being requested.  That's no longer the case, and probably doesn't make sense for  all types of _component requests (some return data and partially rendered HTML).

@jimchamp
Copy link
Collaborator

jimchamp commented Feb 7, 2026

This is working fine on testing, as far as I can tell.

@jimchamp jimchamp merged commit e9be6b2 into master Feb 7, 2026
9 checks passed
@jimchamp jimchamp deleted the refactor/change-partials-url-format branch February 7, 2026 01:12
bhardwajparth51 added a commit to bhardwajparth51/openlibrary that referenced this pull request Feb 17, 2026
…r/change-partials-url-format

Migrate partials endpoint from querystring-based routing to path-based routing
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.

2 participants

X Tutup