diff --git a/CHANGELOG.md b/CHANGELOG.md index e018889..73c9e6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [4.2.1] - 2020-06-04 +### Fixed +- The server library was not exporting `Controller`. +- `ResourceData.toJson()` was not calling the underlying `ResourceObject.toJson()`. + +## [4.2.0] - 2020-06-03 ### Added - Filtering support for collections ([#97](https://github.com/f3ath/json-api-dart/pull/97)) @@ -162,7 +169,8 @@ Most of the changes are **BC-BREAKING**. ### Added - Client: fetch resources, collections, related resources and relationships -[Unreleased]: https://github.com/f3ath/json-api-dart/compare/4.2.0...HEADER +[Unreleased]: https://github.com/f3ath/json-api-dart/compare/4.2.1...HEAD +[4.2.1]: https://github.com/f3ath/json-api-dart/compare/4.2.0...4.2.1 [4.2.0]: https://github.com/f3ath/json-api-dart/compare/4.1.0...4.2.0 [4.1.0]: https://github.com/f3ath/json-api-dart/compare/4.0.0...4.1.0 [4.0.0]: https://github.com/f3ath/json-api-dart/compare/3.2.2...4.0.0 diff --git a/lib/server.dart b/lib/server.dart index 36ea172..66c1532 100644 --- a/lib/server.dart +++ b/lib/server.dart @@ -1,5 +1,6 @@ library server; +export 'package:json_api/src/server/controller.dart'; export 'package:json_api/src/server/dart_server.dart'; export 'package:json_api/src/server/document_factory.dart'; export 'package:json_api/src/server/http_response_converter.dart'; diff --git a/lib/src/document/resource_data.dart b/lib/src/document/resource_data.dart index 6458f60..5dd6059 100644 --- a/lib/src/document/resource_data.dart +++ b/lib/src/document/resource_data.dart @@ -37,7 +37,7 @@ class ResourceData extends PrimaryData { @override Map toJson() => { ...super.toJson(), - 'data': resourceObject, + 'data': resourceObject.toJson(), }; Resource unwrap() => resourceObject?.unwrap(); diff --git a/pubspec.yaml b/pubspec.yaml index 1ca8dfe..4177f12 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: json_api -version: 4.2.0 +version: 4.2.1 homepage: https://github.com/f3ath/json-api-dart description: Framework-agnostic implementations of JSON:API Client (Flutter, Web and VM) and Server (VM). Supports JSON:API v1.0 (http://jsonapi.org) environment: diff --git a/test/e2e/client_server_interaction_test.dart b/test/e2e/client_server_interaction_test.dart index 9d35647..b4a56a1 100644 --- a/test/e2e/client_server_interaction_test.dart +++ b/test/e2e/client_server_interaction_test.dart @@ -11,7 +11,7 @@ import 'package:pedantic/pedantic.dart'; import 'package:test/test.dart'; void main() { - group('Client-Server interation over HTTP', () { + group('Client-Server interaction over HTTP', () { final port = 8088; final host = 'localhost'; final routing =