deconst / content-service

An API for storing, indexing and retrieving documentation
MIT License
4 stars 9 forks source link

Return assets outside of the metadata envelope. #25

Closed smashwilson closed 9 years ago

smashwilson commented 9 years ago

Rather than injecting extra attributes into the envelope as it's served:

{
  "title": "...",
  "body": "...",
  "assets": { },
}

I'd prefer to return the envelope as one attribute of a result document, with other injected properties as other attributes:

{
  "envelope": {
    "title": "...",
    "body": "...",
  },
  "assets": { },
}

This gets rid of an odd and possibly confusing asymmetry within the content service, and cleans up the Handlebars attributes that are available to layouts.