Skip to content

Commit 2e8839b

Browse files
authored
Merge pull request #187 from contentstack/enhc/DX-9498
feat: Update the Read me and version bump for Major Release
2 parents 533c5c1 + 820d16c commit 2e8839b

5 files changed

Lines changed: 73 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
### Version: 3.0.0
2+
#### Date: Jul-13-2026
3+
4+
##### Breaking Changes:
5+
- Removed `Newtonsoft.Json` dependency; all JSON serialisation now uses `System.Text.Json` (BCL)
6+
- `Entry.ToJson()`, `Query.Count()`, `AssetLibrary.Count()` now return `JsonObject` instead of `JObject`
7+
- `AssetLibrary.Query(JsonObject)` — parameter type changed from `JObject` to `JsonObject`
8+
- `ContentType.Fetch()`, `GlobalField.Fetch()`, `GlobalFieldQuery.Find()` now return `JsonObject` instead of `JObject`
9+
- `SerializerSettings``SerializerOptions`
10+
- Model classes use `[JsonPropertyName]` instead of `[JsonProperty]`
11+
- Requires **.NET 10** or later
12+
- Updated `contentstack.utils` dependency to `2.0.0` (final, non-beta)
13+
14+
##### Feat:
15+
- Added `Endpoint` class for dynamic region-to-URL resolution via CDN-backed `regions.json`
16+
- Added `ContentstackRegionMap` to map `ContentstackRegion` enum to registry region IDs
17+
- Added `GCP_EU` region support
18+
- Added `ApiErrorBodyParser` for consistent API error envelope parsing
19+
- Added `JsonNodeConversion` and `JsonObjectMerge` utilities to replace Newtonsoft equivalents
20+
- Added `ContentstackJsonDefaults` — shared `JsonSerializerOptions` used across all custom converters
21+
22+
##### Enh:
23+
- `Config.BaseUrl` now resolves hosts from the regions registry; removed hardcoded `regionCode()` and `HostURL`
24+
- Replaced `Console.WriteLine` with `Debug.WriteLine` in `ContentstackConvert` to suppress parse warnings from application stdout
25+
26+
##### Chore:
27+
- Replaced `refresh-region.cs` with `refresh-region.py` — avoids MSBuild compiling the script as source
28+
- Added `build/contentstack.csharp.targets` to auto-deliver `refresh-region.py` to consumer projects on first build
29+
- Added `Assets/regions.json` to `.gitignore`
30+
- Added `EndpointTest.cs`
31+
- Updated .NET version in SCA scan CI from `7.0.x` to `10.0.x`
32+
33+
##### Migration Guide:
34+
- See [Migrating from Newtonsoft.Json to System.Text.Json](https://www.contentstack.com/docs/developers/sdks/content-delivery-sdk/dot-net/migrate-dotnet-delivery-sdk-from-newtonsoft.json-to-system.text.json) for the full upgrade path from v2.x.
35+
36+
---
37+
138
### Version: 3.0.0-beta.2
239
#### Date: Jun-22-2026
340

Contentstack.Core/Contentstack.Core.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<PackageReference Include="System.Text.Json" Version="8.0.5" />
3333
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
3434
<PackageReference Include="Markdig" Version="0.36.2" />
35-
<PackageReference Include="contentstack.utils" Version="2.0.0-beta.2" />
35+
<PackageReference Include="contentstack.utils" Version="2.0.0" />
3636
<PackageReference Include="System.Net.Http" Version="4.3.4" Condition="'$(TargetFramework)' == 'net47' Or '$(TargetFramework)' == 'net472'" />
3737
</ItemGroup>
3838
<ItemGroup>

Contentstack.Core/ContentstackClient.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using System.Text.Json;
1414
using System.Text.Json.Nodes;
1515
using System.Text.Json.Serialization;
16+
using Contentstack.Utils.Converters;
1617

1718
namespace Contentstack.Core
1819
{
@@ -150,7 +151,7 @@ public ContentstackClient(IOptions<ContentstackOptions> options)
150151
}
151152

152153
// Handles deserialization of embedded entries and assets in _embedded_items responses.
153-
SerializerSettings.Converters.Add(new EmbeddedObjectConverter());
154+
SerializerOptions.Converters.Add(new EmbeddedObjectConverter());
154155
}
155156

156157
public ContentstackClient(ContentstackOptions options) :

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>3.0.0-beta.2</Version>
3+
<Version>3.0.0</Version>
44
</PropertyGroup>
55
</Project>

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77

88
This guide will help you get started with our .NET SDK to build apps powered by Contentstack.
99

10+
## Prerequisites
11+
To get started with .NET, you will need the following:
12+
13+
- .NET 10 or later
14+
15+
> **Migrating from v2.x?** Version 3.0.0 replaces Newtonsoft.Json with System.Text.Json and changes several public API return/parameter types (e.g. `Entry.ToJson()`, `Query.Count()` now return `JsonObject` instead of `JObject`). See the [migration guide](https://www.contentstack.com/docs/developers/sdks/content-delivery-sdk/dot-net/migrate-dotnet-delivery-sdk-from-newtonsoft-to-stj) before upgrading.
16+
1017
## SDK Installation and Setup
1118

1219
To use the .NET SDK, download it from here
@@ -99,6 +106,31 @@ query.Find<Product>().ContinueWith((t) => {
99106
}
100107
});
101108
```
109+
## Endpoint Resolution
110+
111+
Use the `Endpoint` class to resolve Contentstack service URLs for any supported region without hardcoding hosts. This is useful when configuring `ContentstackOptions` for a specific region, including the newly added `gcp-eu` region.
112+
113+
``` cs
114+
using Contentstack.Core.Endpoints; // Endpoint
115+
116+
// Resolve the Content Delivery endpoint for a region
117+
string url = Endpoint.GetContentstackEndpoint("us", "contentDelivery");
118+
// → "https://cdn.contentstack.io"
119+
120+
// GCP-EU region support
121+
string gcpEuUrl = Endpoint.GetContentstackEndpoint("gcp-eu", "contentDelivery");
122+
123+
// Strip the https:// scheme — useful when passing the host directly to SDK configuration
124+
var options = new ContentstackOptions()
125+
{
126+
ApiKey = "<api_key>",
127+
DeliveryToken = "<delivery_token>",
128+
Environment = "<environment>",
129+
Host = Endpoint.GetContentstackEndpoint("eu", "contentDelivery", omitHttps: true)
130+
};
131+
ContentstackClient stack = new ContentstackClient(options);
132+
```
133+
102134
## API Reference
103135
Go through our .NET SDK API Reference guide to know about the methods that can be used to query your content in Contentstack.
104136

0 commit comments

Comments
 (0)