simonw / datasette

An open source multi-tool for exploring and publishing data
https://datasette.io
Apache License 2.0
9.47k stars 677 forks source link

Tweak design of /.json #1674

Open simonw opened 2 years ago

simonw commented 2 years ago

https://latest.datasette.io/.json

Currently:

{
  "_memory": {
    "name": "_memory",
    "hash": null,
    "color": "a6c7b9",
    "path": "/_memory",
    "tables_and_views_truncated": [],
    "tables_and_views_more": false,
    "tables_count": 0,
    "table_rows_sum": 0,
    "show_table_row_counts": false,
    "hidden_table_rows_sum": 0,
    "hidden_tables_count": 0,
    "views_count": 0,
    "private": false
  },
  "fixtures": {
    "name": "fixtures",
    "hash": "645005884646eb941c89997fbd1c0dd6be517cb1b493df9816ae497c0c5afbaa",
    "color": "645005",
    "path": "/fixtures",
    "tables_and_views_truncated": [
      {
        "name": "compound_three_primary_keys",
        "columns": [
          "pk1",
          "pk2",
          "pk3",
          "content"
        ],
        "primary_keys": [
          "pk1",
          "pk2",
          "pk3"
        ],
        "count": 1001,
        "hidden": false,
        "fts_table": null,
        "num_relationships_for_sorting": 0,
        "private": false
      },

As-of this issue the "path" key is confusing, it doesn't match what https://latest.datasette.io/-/databases returns:

simonw commented 2 years ago

This will probably happen as part of turning this into an officially documented API that serves the template context for the homepage: