transporter icon indicating copy to clipboard operation
transporter copied to clipboard

Reorder 0.3.0 options to reduce editing

Open codepope opened this issue 8 years ago • 3 comments

Version 0.3.0

Feature Request

Make editing init generated pipeline.js/opts easier.

Proposal:

Currently generated

var source = mongodb({
  "uri": "${MONGODB_URI}"
  // "timeout": "30s",
  // "tail": false,
  // "ssl": false,
  // "cacerts": ["/path/to/cert.pem"],
  // "wc": 1,
  // "fsync": false,
  // "bulk": false,
  // "collection_filters": "{}"
})

Suggest moving uncommented options to the end like so:

var source = mongodb({
  // "timeout": "30s",
  // "tail": false,
  // "ssl": false,
  // "cacerts": ["/path/to/cert.pem"],
  // "wc": 1,
  // "fsync": false,
  // "bulk": false,
  // "collection_filters": "{}",
  "uri": "${MONGODB_URI}"
})

Items can be uncommented without checking for comma correctness.

codepope avatar Mar 22 '17 11:03 codepope

In my opinion, it is also not very intuitive to generate sample configs that can't be used as-is. (ie. what's the point of wc, fsync and bulk on the source-side?)

rethab avatar Mar 27 '17 12:03 rethab

@rethab good points, including all possible options is a recent change but may prove to be more confusing. Now that we have a README for every adaptor and function, it can likely serve as the place to go to see all possible configuration options and any default/sample configs will only contain the bare minimum.

jipperinbham avatar Mar 27 '17 18:03 jipperinbham

@jipperinbham I think we want to keep the self-documenting nature to some point so, I'd propose an extension to about which covers an options description and notes on source/sink use.

codepope avatar Mar 27 '17 19:03 codepope