mirror of
https://github.com/simonw/datasette.git
synced 2026-06-12 20:16:56 +02:00
Remove legacy ?_extras= row parameter
The pre-1.0 ?_extras= (plural) parameter was kept for backwards compatibility with the old row JSON API. ?_extra= is the documented mechanism now that row pages share the extras registry. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
4d6daa175a
commit
f4b4506035
2 changed files with 1 additions and 6 deletions
|
|
@ -165,13 +165,8 @@ class RowView(DataView):
|
|||
"primary_key_values": pk_values,
|
||||
}
|
||||
|
||||
# Handle _extra parameter (new style)
|
||||
extras = _get_extras(request)
|
||||
|
||||
# Also support legacy _extras parameter for backward compatibility
|
||||
if "foreign_key_tables" in (request.args.get("_extras") or "").split(","):
|
||||
extras.add("foreign_key_tables")
|
||||
|
||||
# Process extras
|
||||
row_extra_context = RowExtraContext(
|
||||
datasette=self.ds,
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@ async def test_row_strange_table_name(ds_client):
|
|||
@pytest.mark.asyncio
|
||||
async def test_row_foreign_key_tables(ds_client):
|
||||
response = await ds_client.get(
|
||||
"/fixtures/simple_primary_key/1.json?_extras=foreign_key_tables"
|
||||
"/fixtures/simple_primary_key/1.json?_extra=foreign_key_tables"
|
||||
)
|
||||
assert response.status_code == 200
|
||||
# Foreign keys are sorted by (other_table, column, other_column)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue