numo-labs / lambda-taggable-createDocument

:memo: Tag-E Create and Update Documents
3 stars 0 forks source link

Add Sample Event (JSON) Doc to Readme #1

Closed nelsonic closed 8 years ago

nelsonic commented 8 years ago

Its unclear from the readme what the expected format of a document is... Simply linking to examples/masterhotel_example.js because the example(s) aren't valid JSON so cannot be used to run the test in AWS Console > Lambda (browser base test) ...

We need valid JSON e.g:

{
  "_id": "foo-id",
  "displayName": "foo-display-name",
  "tags": [
    {
      "tagId": "geography:geonames.123",
      "tagType": "geography",
      "source": "tag:source.user.12234",
      "active": true
    },
    {
      "tagId": "geography:geonames.125",
      "tagType": "geography",
      "source": "tag:source.user.12235",
      "active": false
    }
  ],
  "metadata": [
    {
      "key": "label:en",
      "values": [
        "Hotel ABC"
      ]
    },
    {
      "key": "search:en",
      "values": [
        "Hotel ABC"
      ]
    }
  ]
}
nelsonic commented 8 years ago

done.