Releases: pixelhandler/ember-jsonapi-resources
Trotter
- Upgrade to ember-cli version: 2.3.0-beta.2
- Upgrade ember-try to 0.1.2, add config for Ember v2.3.1
Even though the dependency for ember-cli is changing from v1 to v2, there are no backwards incompatible changes. Apps using ember-cli 1.13.15 or ember-cli 2.3.0-beta.2 can use this version 1.1.0-beta.1.
Once ember-cli v2 is final ember-jsonapi-resources will release a minor version bump (no breaking changes expected).
Chopper
- Refactor relationship assignment for adding/removing relations
- Add rollback behavior for resource#updateRelationship
Add/remove relations via proxy content
Enhances behavior of adding and removing relationships to a resource.
On a Resource object, with related (computed properties) proxy objects, the addRelationship
and removeRelationship
methods utilize the related service's cache data to add (assign) or remove the related resource via the content
of the related proxy object. Resource objects that have isNew
set to true will use proxy objects as well, (no related promise proxy, only a proxy). Creating a resource with relations requires the relationships
object to include a links
object with a related
property that is the URL for the relationship data.
Update to Ember v2.3
Minor enhancements…
- Add HTTP status code as a property of the custom error objects.
- Change arguments for FetchError to use
response
orerror
as 2nd argument, remove 3rd argument. - Use common error messaging/formatting methods for custom error types based on request type (fetch/xhr)
- Use Ember CLI v1.13.14
- User Ember v2.3.0
- Update Ember Try config and travis settings to run various builds of Ember
Blueprint for Transform Mixin
The jsonapi-transform-mixin
generates a mixin to use with your serializer for specific attributes that you have transform objects for.
Example workflow for adding a custom transform for the status attribute of a post resource (model):
ember g jsonapi-dictionary status active:Active pending:Pending archived:Archive
ember g jsonapi-transform status
ember g jsonapi-transform-mixin post status
See: https://github.com/pixelhandler/ember-jsonapi-resources/wiki/Transforms
Blueprints for Transforms/Dictionaries
New blueprints are to support custom types or value formatting via methods (de)serialize
. E.g to support an enum field in your database.
- Add blueprint for dictionary utility to use with transform objects
- Add value transform blueprint which uses util/dictionaries objects
See:
Long live JSON API
The 1.0 API for ember-jsonapi-resources is done and ready to rock-n-roll.
Embrace the Owner API
- Use owner API instead of this.container
- Add error names to utils/errors
- Add specific error handing methods to responses
Changes to utilize the owner api which releases with Ember v2.3.0 are backwards compatible using the container.
Expanded Adapter API
Adds to Adapter API by expanding the Fetch mixin to include many response handler methods.
- Add methods for Fetch/Ajax responses for no content and success
- Add methods for Fetch/Ajax client/server/general error handling
- Add methods for Ajax done/fail as closures with resolve/reject handlers
- Move custom errors to util module
Initial Beta Release
Works well in my beta apps, momentum toward a 1.0.0 release begins now.