Skip to content

Latest commit

 

History

History
29 lines (23 loc) · 1.34 KB

UPGRADING.md

File metadata and controls

29 lines (23 loc) · 1.34 KB

v2.2.11 -> v2.3 (Not Semver)

Breaking Changes

  • 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;