Skip to content

Blueprints JSON is incorrectly formatted #30

@breezykermo

Description

@breezykermo

Duplicated blueprints when multiple resources

In the JSON returned from the /api/blueprints route currently, a sheet/tab that has multiple resources is shown as two separate objects. For example:

[
    {
      "name": "export_events",
      "sheet": {
        "name": "example",
        "id": "1SJ4D30c5s1lrMKU3v3cfhNZv9vdKp6_sPJQ0s2hw6R0"
      },
      "resources": {
        "deeprows": null
      }
    },
    {
      "name": "export_events",
      "sheet": {
        "name": "example",
        "id": "1SJ4D30c5s1lrMKU3v3cfhNZv9vdKp6_sPJQ0s2hw6R0"
      },
      "resources": {
        "rows": null
      }
    }
]

These resources should be collapsed into just one blueprint, e.g.:

{
      "name": "export_events",
      "sheet": {
        "name": "example",
        "id": "1SJ4D30c5s1lrMKU3v3cfhNZv9vdKp6_sPJQ0s2hw6R0"
      },
      "resources": {
        "rows": null,
        "deeprows": null
      }
}

Blueprints from different sheets shown in separate lists

If you have a datasheet server that fetches from multiple sheets, the blueprints route return a list of lists, where each inner list contains the blueprints relevant to only one sheet.

The blueprints should all be presented in the same list; i.e. flatMapped so that the blueprints of a server are a list of blueprints, rather than a list of a list of blueprints.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleaseCurrently in progress for next release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions