Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

1.0.0-beta.9 (2020-10-12)

Pre-release
Pre-release
Compare
Choose a tag to compare
@pheekus pheekus released this 12 Oct 18:51
· 5 commits to master since this release
a4355fe

This update brings a couple of fixes and improvements to the URL resolver and sanitization utilities.

Bug fixes

  • removePrivateAttributes: make sure only embeds are sanitized
    In previous versions this method would fail to process response objects that had a fx:attributes entry under _links. This is no longer the case.
  • resolver: fix .follow(ID) calls
    We've recently discovered that when a numeric ID was passed to the Resolver#follow method, the URL resolution algorithm was almost always returning a wrong path even if the smart resolution option was turned off. Beta 9 fixes this issue, adding new resolution rules outlined below.

Features

  • add support for fx:customer_portal_settings (types and static resolver) and upcoming allowNextDateModification schema changes.

Updated resolution algorithm for attributes and IDs:

  1. Paths ending with fx:attributes are always resolved as [parent]/attributes;
  2. Paths ending with a number are resolved as follows:
    • If parent curie is fx:attributes, take the closest string value up the chain, convert it to an attribute collection relation name and resolve to [root]/[attribute_collection]/[ID];
    • Otherwise convert the parent curie name to a relation name and resolve to [root]/[rel]/[ID];
    • In rare cases when the above fails, simply append the ID to the path: [parent]/[ID]