|
1 | 1 | # Implementation of [JSON:API v1.0](http://jsonapi.org) in Dart |
2 | 2 |
|
3 | | -**This is a work in progress. The API may change.** |
| 3 | +#### Feature roadmap |
| 4 | +##### Client |
| 5 | +- [x] Fetching single resources and resource collections |
| 6 | +- [x] Fetching relationships and related resources and collections |
| 7 | +- [x] Fetching single resources |
| 8 | +- [ ] Creating resources |
| 9 | +- [ ] Updating resource's attributes |
| 10 | +- [ ] Updating resource's relationships |
| 11 | +- [ ] Updating relationships |
| 12 | +- [ ] Deleting resources |
| 13 | +- [ ] Asynchronous processing |
4 | 14 |
|
5 | | -## General architecture |
| 15 | +##### Server (The Server API is not stable yet!) |
| 16 | +- [x] Fetching single resources and resource collections |
| 17 | +- [x] Fetching relationships and related resources and collections |
| 18 | +- [x] Fetching single resources |
| 19 | +- [ ] Creating resources |
| 20 | +- [ ] Updating resource's attributes |
| 21 | +- [ ] Updating resource's relationships |
| 22 | +- [ ] Updating relationships |
| 23 | +- [ ] Deleting resources |
| 24 | +- [ ] Inclusion of related resources |
| 25 | +- [ ] Sparse fieldsets |
| 26 | +- [ ] Sorting, pagination, filtering |
| 27 | +- [ ] Asynchronous processing |
6 | 28 |
|
7 | | -The library consists of three major parts: Document, Server, and Client. |
| 29 | +##### Document |
| 30 | +- [ ] Support `meta` and `jsonapi` members |
| 31 | +- [ ] Structure Validation |
| 32 | +- [ ] Naming Validation |
| 33 | +- [ ] JSON:API v1.1 features |
8 | 34 |
|
9 | | -### Document |
10 | | -This is the core part. |
11 | | -It describes JSON:API Document and its components (e.g. Resource Objects, Identifiers, Relationships, Links), |
12 | | -validation rules (naming conventions, full linkage), and service discovery (e.g. fetching pages and related resources). |
| 35 | +### Usage |
| 36 | +In the VM: |
| 37 | +```dart |
| 38 | +import 'package:json_api/client.dart'; |
13 | 39 |
|
14 | | -### Client |
15 | | -This is a JSON:API client based on Dart's native HttpClient. |
| 40 | +final client = JsonApiClient(); |
| 41 | +``` |
16 | 42 |
|
17 | | -### Server |
18 | | -A JSON:API server. Routes requests, builds responses. |
| 43 | +In a browser: |
| 44 | +```dart |
| 45 | +import 'package:json_api/client.dart'; |
| 46 | +import 'package:http/browser_client.dart'; |
| 47 | +
|
| 48 | +final client = JsonApiClient(factory: () => BrowserClient()); |
| 49 | +``` |
| 50 | + |
| 51 | +For usage examples see a corresponding test in `test/functional`. |
0 commit comments