bentonam / fakeit

Generates JSON documents based on models defined in YAML and adds them to a Couchbase Bucket
MIT License
86 stars 21 forks source link

Issue #136: Store documents in Couchbase as JSON data format #137

Closed brantburnett closed 7 years ago

brantburnett commented 7 years ago

Motivation

Currently, when outputting to Couchbase documents are marked with the string data format. This can cause compatibility issues with some Couchbase SDKs, such as .Net.

Modifications

When outputting to Couchbase with the JSON format, use an output parser that does nothing and returns in the in-memory object.

Results

JSON is serialized by the Couchbase NodeJS SDK, so it sets the data format correctly as JSON instead of string.

bentonam commented 7 years ago

The build is failing right now because of lint rules error. We updated the lint-rules module we were using and our package.json was not specifying a specific version for the lint rules. @tjbenton has a PR in to fix that which after that is merged your build should pass.

bentonam commented 7 years ago

All of the tests are running fine, this is just failing linting for:

/home/travis/build/bentonam/fakeit/app/output/index.js
   90:15  warning  Async method 'output' has too many statements (28). Maximum allowed is 25  max-statements
  194:20  error    Strings must use singlequote                                               quotes
  194:46  error    Strings must use singlequote                                               quotes
  196:12  error    Unnecessary 'else' after 'return'                                          no-else-return

I will go ahead and merge this and amend your changes to get the lint rules passing then we will do a minor release

brantburnett commented 7 years ago

Thanks!