Skip to content

Commit 1e192c0

Browse files
authored
Release 4.3.0 (#108)
1 parent dab86f6 commit 1e192c0

File tree

4 files changed

+28
-18
lines changed

4 files changed

+28
-18
lines changed

CHANGELOG.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
## [4.3.0] - 2020-07-30
9+
### Added
10+
- `meta` parameter for createResourceAt()
11+
812
### Removed
913
- Dropped support for Dart 2.6
1014

@@ -106,14 +110,14 @@ is missing. Before in such cases a `FormatException` would be thrown ([pr](https
106110
## [2.0.0] - 2019-07-12
107111
### Changed
108112
- This package now consolidates the Client, the Server and the Document in one single library.
109-
It does not depend on `json_api_document` and `json_api_server` anymore, please remove these packages
110-
from your `pubspec.yaml`.
113+
It does not depend on `json_api_document` and `json_api_server` anymore, please remove these packages
114+
from your `pubspec.yaml`.
111115
- The min Dart SDK version bumped to `2.3.0`
112116
- The Client requires an instance of HttpClient to be passed to the constructor explicitly.
113117
- Both the Document and the Server have been refactored with lots of **BREAKING CHANGES**.
114-
See the examples and the functional tests for details.
118+
See the examples and the functional tests for details.
115119
- Meta properties are not defensively copied, but set directly. Meta property behavior is unified across
116-
the Document model.
120+
the Document model.
117121

118122
### Removed
119123
- `JsonApiParser` is removed. Use the static `decodeJson` methods in the corresponding classes instead.
@@ -172,7 +176,8 @@ is missing. Before in such cases a `FormatException` would be thrown ([pr](https
172176
### Added
173177
- Client: fetch resources, collections, related resources and relationships
174178

175-
[Unreleased]: https://github.com/f3ath/json-api-dart/compare/4.2.2...HEAD
179+
[Unreleased]: https://github.com/f3ath/json-api-dart/compare/4.3.0...HEAD
180+
[4.3.0]: https://github.com/f3ath/json-api-dart/compare/4.2.2...4.3.0
176181
[4.2.2]: https://github.com/f3ath/json-api-dart/compare/4.2.1...4.2.2
177182
[4.2.1]: https://github.com/f3ath/json-api-dart/compare/4.2.0...4.2.1
178183
[4.2.0]: https://github.com/f3ath/json-api-dart/compare/4.1.0...4.2.0

lib/src/client/json_api_client.dart

+4-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ class JsonApiClient {
6767
/// https://jsonapi.org/format/#crud-creating
6868
Future<Response<ResourceData>> createResourceAt(Uri uri, Resource resource,
6969
{Map<String, String> headers, Map<String, Object> meta}) =>
70-
_call(_post(uri, headers, _resourceDoc(resource, meta: meta)), ResourceData.fromJson);
70+
_call(_post(uri, headers, _resourceDoc(resource, meta: meta)),
71+
ResourceData.fromJson);
7172

7273
/// Deletes the resource.
7374
///
@@ -127,7 +128,8 @@ class JsonApiClient {
127128

128129
final _api = Api(version: '1.0');
129130

130-
Document<ResourceData> _resourceDoc(Resource resource, {Map<String, Object> meta}) =>
131+
Document<ResourceData> _resourceDoc(Resource resource,
132+
{Map<String, Object> meta}) =>
131133
Document(ResourceData.fromResource(resource), meta: meta, api: _api);
132134

133135
Document<ToMany> _toManyDoc(Iterable<Identifier> identifiers) =>

pubspec.yaml

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
name: json_api
2-
version: 4.2.2
3-
homepage: https://github.com/f3ath/json-api-dart
4-
description: Framework-agnostic implementations of JSON:API Client (Flutter, Web and VM) and Server (VM). Supports JSON:API v1.0 (http://jsonapi.org)
5-
environment:
6-
sdk: '>=2.7.0 <3.0.0'
2+
version: 4.3.0
3+
description: "Framework-agnostic implementations of JSON:API Client (Flutter, Web and VM) and Server (VM). Supports JSON:API v1.0 (http://jsonapi.org)"
4+
homepage: "https://github.com/f3ath/json-api-dart"
5+
76
dependencies:
87
http: ^0.12.0
98
http_parser: ^3.1.4
9+
1010
dev_dependencies:
1111
args: ^1.5.2
12-
pedantic: ^1.9.0
13-
test: ^1.9.2
1412
json_matcher: ^0.2.3
13+
pedantic: ^1.9.0
14+
shelf: ^0.7.5
1515
stream_channel: ^2.0.0
16-
uuid: ^2.0.1
16+
test: ^1.9.2
1717
test_coverage: ^0.4.0
18-
shelf: ^0.7.5
18+
uuid: ^2.0.1
19+
20+
environment:
21+
sdk: ">=2.7.0 <3.0.0"

test/functional/crud/creating_resources_test.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ void main() async {
1313
final base = Uri(scheme: 'http', host: host, port: port);
1414
final routing = StandardRouting(base);
1515

16-
group('Server-genrated ID', () {
16+
group('Server-generated ID', () {
1717
test('201 Created', () async {
1818
final repository = InMemoryRepository({
1919
'people': {},
@@ -53,7 +53,7 @@ void main() async {
5353
});
5454
});
5555

56-
group('Client-genrated ID', () {
56+
group('Client-generated ID', () {
5757
JsonApiClient client;
5858
RoutingClient routingClient;
5959
setUp(() async {

0 commit comments

Comments
 (0)