This repository was archived by the owner on Sep 6, 2025. It is now read-only.
Upgrade RestSharp dependency #137
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
RestSharp made quite a few breaking changes to their library (unsure at what version exactly). Running into some dependency problems with other libraries wanting more recent versions of RestSharp. So these are the changes necessary to use most recent releases.
You'll see the majority of changes are simple method/verb types, and parameter type changes.
The real "significant" changes are in
Http.ConnectionandExtensions.RestSharpExtensions, where JSON (de)serialization is occurring. RestSharp was actually using its own hybrid JSON (de)serializer. It was not using Newtonsoft internally (what I originally thought was happening, but unfortunately not). With their updates they abstracted out all serialization completely and deprecated their hybrid serialization in favor of dependencies to handle that. So they have components to choose between using Newtonsoft or System.Text.Json now.We chose to use Newtonsoft as simplest to make a mostly 1:1 conversion. As Newtonsoft's serializer is quite forgiving, compared to System.Text.Json. Switching to .NET's System.Text.Json would likely be preferable in long run, but would require significantly more testing and checks to assure all is ok. Also this library was already partially using Newtonsoft as well (yet to make the System.Text.Json plunge).
So the major changes controlling (de)serialization were in those classes (
Http.ConnectionandExtensions.RestSharpExtensions). Attempting to keep the current design/flow as much as possible.We are primarily only using the client for Droplets, so primarily have only tested against those endpoints. Assuming all others should be ok as well. All Unit Tests still pass.