Canvas - Missing JSON Canvas compatibility

Consider the following JSON Canvas-compatible code:

{
  "nodes": [
    {
      "id": "1",
      "type": "text",
      "x": 100,
      "y": 100,
      "width": 200,
      "height": 50,
      "text": "1"
    },
    {
      "id": "2",
      "type": "text",
      "x": 500,
      "y": 100,
      "width": 200,
      "height": 50,
      "text": "2"
    }
  ],
  "edges": [
  {
      "id": "edge1",
      "fromNode": "1",
      "toNode": "2",
      "label": "description"
  }
  ],
  "metadata": {}
}

Steps to reproduce

  1. Save it as .canvas file and put it in the vault folder
  2. Open the file with Obsidian

Expected result

It should render a graph with 2 nodes and an edge between them.

Actual result

It doesn’t render the graph

Environment

SYSTEM INFO:
	Obsidian version: v1.6.7
	Installer version: v1.6.5
	Operating system: #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 5.15.0-94-generic
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: off
	Plugins installed: 1
	Plugins enabled: 1
		1: Advanced Canvas v3.0.3

RECOMMENDATIONS:
	Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.

Additional information

Possible solution

Test for compatibility with JSON Canvas spec.

Particularly, if you remove the edge from the list, then it renders fine.

It appears that properties fromSide and toSide are necessary.

Changing the edge properties to this, renders it fine:

  "edges": [
    {
      "id": "edge1",
      "fromNode": "1",
      "toNode": "2",
      "fromSide": "right",
      "toSide": "left",
      "label": "description"
    }
  ],

However, according to the version 1.0 spec, these fields are optional , so this behavior shouldn’t be exhibited.

thanks. Either we made the spec wrong or there’s a bug in the app.