- Added
configure
to allow changing configuration options after the resource has been initially configured.
railsResourceFactoryProvider
settings have been moved toRailsResourceProvider
wrapData
config option has been renamedrootWrapping
- All resource settings are now stored under the
config
property on the resource and should be modified using theconfigure
function. - The following resource settings have been renamed:
enableRootWrapping
was renamedrootWrapping
rootName
was renamedname
rootPluralName
was renamedpluralName
- Issue #67 incorrect date deserialization led to errors constructing a new resource with a property that was type Date
- Added updateMethod configuration option to railsResourceFactory to specify what HTTP method should be used to perform the update action
- Exposed default configuration options for both railsResourceFactory and railsSerializer as provider configuration options.
- Added context property to before response interceptors to have access to the calling resource instance in the case of create/update/delete.
- Added after response interceptors to be able to define custom callbacks that execute on all resources after method completion.
- Removed default transformers and interceptors
- railsFieldRenamingTransformer and railsFieldRenamingInterceptor have been removed completely and replaced by the serializers
- railsRootWrappingTransformer/Interceptor are no longer configured by the transformers/interceptors configuration option and is instead
configured by the
wrapData
option.
- Interceptors added using
beforeRequest
are run before any deserialization so the fields names have not been camelized.
- Added serializers to replace old field renaming logic and to give users a lot more flexibility in customizing the (de)serialization process
- Added
rootWrapping
configuration option to be able to turn off root wrapping instead - Added path option to
$url
methods to make it easier to construct a nested url.
- New
save
instance method added to resources
- Added beforeRequest and beforeResponse methods that wrap a given function as a transformer/interceptor to more easily add customizations
- Added setUrl method to allow reconfiguring a resource's url after creation
- Added $url instance method to more easily reference the instance's URL
- Added instance and class methods for generic HTTP operations of $get, $post, $put, $delete