Skip to content

Files

Latest commit

Jun 25, 2015
a972d64 · Jun 25, 2015

History

History
39 lines (30 loc) · 1.86 KB

UPGRADING.md

File metadata and controls

39 lines (30 loc) · 1.86 KB

v2.5 -> 2.6 Breaking Changes (Not Semver until 3.0)

  • In relationship objects, self and related links now properly show up under the links key. Closes #36.

v2.4 -> 2.5 Breaking Changes (Not Semver until 3.0)

  • The location property on the Response class is now at response.headers.location instead of response.location.

v2.3 -> 2.4 Breaking Changes (Not Semver until 3.0)

  • Sort fields (in the sort query parameter) no longer need to be prefixed by a "+" to trigger ascending order, per JSON API 1.0.

v2.2.11 -> v2.3 Breaking Changes (Not Semver until 3.0)

  • Mongoose 4 is now required.

  • The MongooseAdapter is now at a different export path: require("json-api").dbAdapters.MongooseAdapter. Update your references to the adapter accordingly.

  • Resource type descriptions now use a dbAdapter property instead of adapter.

  • The Front Controller has been replaced with an ExpressStrategy, which is exported at require("json-api").httpStrategies.Express). The API is the same as for the old Front Controller, with the addition of some new options.

  • The new payload's resource object format complies with JSON API 1.0, meaning it uses the relationships container, rather putting relationships under links, and uses a data member instead of linkage within relationships.

  • In auto-generated documentation’s JSON, many names were dasherized or tweaked:

    • field.kind.isArray => field.kind.is-array;

    • field.kind.targetModel => target-model;

    • field.kind.targetType => field.kind.target-type

    • field.friendlyName => field.friendly-name

    • field.validation.readOnly => field.validation.read-only;

    • field.validation.allowedHtml => field.validation.allowed-html

    • field.kind.name => field.kind.base-type;

      • "Link fields" get field.kind.base-type = "Relationship" rather than "Link"
      • field.validation.oneOf => field.validation.enum;