/-/plugins.json is now an array of objects again (#2843)

Reverts the object envelope introduced in 1.0a36 for this endpoint -
it once again returns a top-level JSON array of plugin objects.

Closes #2842


Claude-Session: https://claude.ai/code/session_012TYc1NTBK4zEjabB3u2zqu

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Simon Willison 2026-07-13 21:19:04 -07:00 • committed by GitHub
commit ccace40e5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 21 additions and 25 deletions

View file

@ -614,13 +614,13 @@ async def test_plugins_json(ds_client):
response = await ds_client.get("/-/plugins.json")
# Filter out TrackEventPlugin
actual_plugins = sorted(
[p for p in response.json()["plugins"] if p["name"] != "TrackEventPlugin"],
[p for p in response.json() if p["name"] != "TrackEventPlugin"],
key=lambda p: p["name"],
)
assert EXPECTED_PLUGINS == actual_plugins
# Try with ?all=1
response = await ds_client.get("/-/plugins.json?all=1")
names = {p["name"] for p in response.json()["plugins"]}
names = {p["name"] for p in response.json()}
assert names.issuperset(p["name"] for p in EXPECTED_PLUGINS)
assert names.issuperset(DEFAULT_PLUGINS)