Skip to content

Latest commit

 

History

History
151 lines (118 loc) · 5.69 KB

CHANGELOG.md

File metadata and controls

151 lines (118 loc) · 5.69 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

0.31.0 - 2017-10-19

Added

  • Added end to end unit tests.

Changed

  • Updated list and find to return original "_id"s instead of strings.
  • Swapped to js Promise rather than Q promise for mongoose.

Fixed

  • Fixed bug preventing "$where" association queries.
  • Added a 'select' call to association endpoints to allow owner object to be updated during association middleware.
  • Fixed bug with linking model modelName.
  • Added missing return statement to removeAssociation. Was causing promises to return before mongo entries updated.

0.30.0 - 2017-10-12

Added

0.29.0 - 2017-10-10

Added

Changed

  • Deprecated routeOptions.scope and routeOptions.scope.scope and replaced with routeOptions.routeScope and routeOptions.routeScope.rootScope.

0.28.0 - 2017-09-29

Added

Fixed

  • Updated hapi-swagger to fix circular reference issue.

0.27.0 - 2017-09-28 BREAKING

Added

  • Added option (config.embedAssociations) to use linking model collections.
  • See docs for details.

Changed

  • BREAKING config.embedAssociations set to false by default to take advantage of mongoose virtuals. If you already have documents in your db, set this option to true to continue with the same functionality.
  • If possible, future versions will include a cli command to convert existing db data between MANY_MANY structures.

0.26.0 - 2017-09-24

Added

  • Added config option to disable 500 response for response validation (disabled by default).

Changed

  • Cleaned up tests
  • Major updates to joi helper functions including support for nested fields.

0.25.0 - 2017-09-20

Added

  • Added config option to enable logging of routes and scopes (disabled by default).

0.24.0 - 2017-09-19

Added

Fixed

  • Throw error when payload is empty for addMany.

0.23.0 - 2017-09-12

Added

  • Allow custom errors in middleware

Changed

  • Cleaned up tests
  • Removed requirement that middlware functions return a promise.

0.22.0 - 2017-09-08

Added

  • getAll association middleware
  • Uncommented and updated deleteOne handler tests.

Changed

  • Replaced Boom.serverTimeout with .badImplementation

0.21.0 - 2017-09-06

Added

  • list and find pre middleware
  • Uncommented and updated create and update handler tests.

0.20.3 - 2017-09-01

Changed

  • Fixed bug that missed when a payload is an array of Ids.

0.20.2 - 2017-08-31

Added

  • Uncommented and updated find handler tests.

Changed

  • Update dependencies and tests so that rest-hapi works under node v8.

0.20.0 - 2017-08-29 BREAKING

Added

  • Hapi request object now accessible in middleware functions.

Changed

  • BREAKING Middleware function parameters have changed to support the request object.
    • The table below shows the middleware functions before (v0.19.2) and after (v0.20.0)
Before After
list
post(query, result, Log) post(request, result, Log)
--- ---
find
post(query, result, Log) post(request, result, Log)
--- ---
create
pre(payload, Log) pre(payload, request, Log)
post(document, result, Log) post(document, request, result, Log)
--- ---
update
pre(_id, payload, Log) pre(_id, request, Log)
post(payload, result, Log) post(request, result, Log)
--- ---
delete
pre(_id, hardDelete, Log) pre(_id, hardDelete, request, Log)
post(hardDelete, deleted, Log) post(hardDelete, deleted, request, Log)