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
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 afx: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 theResolver#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 upcomingallowNextDateModification
schema changes.
Updated resolution algorithm for attributes and IDs:
- Paths ending with
fx:attributes
are always resolved as[parent]/attributes
; - 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]
- If parent curie is