netcreateorg / netcreate-itest

Developing the 2.0 version of NetCreate
https://github.com/netcreateorg/netcreate-2018
Other
1 stars 1 forks source link

Designate "required" vs "optional" fields in template defintions? #257

Open benloh opened 2 months ago

benloh commented 2 months ago

How do we programmatically distinguish between the required fields and the optional "attribute" fields?

Built-in fields are currently defined in app/system/util/enum.js

Nodes

Required

Edges

Required

Use

Currently we use a filter to retrieve attributes fields from the full list of node definitions:

const attributes = Object.keys(nodeDefs).filter(
      k => !BUILTIN_FIELDS_NODE.includes(k)
    );