Update http deps to use v1.x.x
Currently json api package requires http v0.13.x. Most up to date version of http package is v1.1.0.
@f3ath, when can we expect a bump in the http package version? Because many different packages with new flutter have constraints on ^1.x.x for http package.
Hey folks. I just released v6. Please give it a shot. This package is now decoupled from the particular client/server implementation via http_interop which does support http v1. I am also planning to add a wrapper for dio. It's a bit more complicated to set up, please take a look at the example: https://github.com/f3ath/json-api-dart/blob/6.0.0/example/client.dart
Please LMK what you think.
@f3ath thank you for the update. I just played with v6 a little bit, and it seems NewRelationship type is not exported
also, it would be cool to have contructor for NewIdentifier or any other object, where you can create Idetifier with just type but without id and lid. But if it's goes against the docs, then ok)
Thanks for the feedback. I hope to address the issues sometime this week. You're more than welcome to open a PR too.
also, it would be cool to have contructor for
NewIdentifieror any other object, where you can create Idetifier with justtypebut withoutidandlid. But if it's goes against the docs, then ok)
This would indeed contradict the standard as per
A “resource identifier object” MUST contain a type member. It MUST also contain an id member, except when it represents a new resource to be created on the server. In this case, a lid member MUST be included that identifies the new resource.
What's the use case for that, @TatsuUkraine?
Docs also have this definition .
Every resource object MUST also contain an id member, except when the resource object originates at the client and represents a new resource to be created on the server. If id is omitted due to this exception, a lid member MAY be included to uniquely identify the resource by type locally within the document
Which is a little bit confusing, since one section says it's required, and another - that it's optional)
Actually, nvm, Identifier is for relationships, and the link in my last message was about the resource ) sorry for confusion
Any updates for this issue? Most packages are now updated to http: ^1.1.x, making this a bottleneck.
@daniloapr Does version 7.0 not solve the issue with http 1.1? The http_interop is intended to be a solution for this kind of troubles, it requires a bit more boilerplate/init code but should make the dependency management easier.
The json_api was actually used by another library that my project imports, which uses the version 7.0.0. It was showing the http conflict, but after I forked the library and set the fixed the version, it worked. Thank you for the response!