code: function formMap(k, v) {
      // customized props
      switch (k) {
          case "link.type": {
              return {
                  type: "array",
                  title: "link.type",
                  items: {
                      enum: Object.keys(LINE_TYPES),
                  },
                  uniqueItems: true,
              };
          }
      }
  
      return {
          title: k,
          type: typeof v,
          default: v,
      };
  }
docs: This two functions generate the react-jsonschema-form
  schema from some passed graph configuration.