Commit f1df975
committed
feat: Migrate SDK from Newtonsoft.Json to System.Text.Json
- Replace all [JsonProperty] attributes with [JsonPropertyName] across all model classes (LabelModel, ExtensionModel, RoleModel, OAuthResponse, OAuthAppAuthorizationResponse, ExtensionScope, RoleModel nested classes, Token models)
- Remove [JsonObject] attributes — null handling covered globally by DefaultIgnoreCondition = WhenWritingNull
- Replace Newtonsoft JsonSerializer/JsonConverter with System.Text.Json equivalents in all service constructors and model classes
- Migrate ParameterCollection.AddQuery(JObject) → AddQuery(JsonNode) and QueryParamValue.JObjectParameterValue to use JsonNode
- Remove OpenJObjectResponse() from IResponse and ContentstackResponse — replaced by OpenJsonObjectResponse() (System.Text.Json.Nodes.JsonObject)
- Rewrite NodeJsonConverterTest and TextNodeJsonConverterTest using STJ public API (JsonSerializer.Serialize/Deserialize)
- Rewrite CustomJsonConverter mock from Newtonsoft JsonConverter base to JsonConverter<object> (STJ)
- Migrate CustomWidgetModel scope serialization from JsonTextWriter to JsonSerializer.Serialize
- Remove Newtonsoft.Json 13.0.3 package reference from core csproj
- Re-enable all previously excluded model files (Role, Taxonomy, Term, Extension, Label, AuditLog, Webhook, Token, CustomExtension) and uncomment corresponding Stack accessor methods
- Re-enable 4 excluded integration test files and fix missing using directives
- Re-enable all 25 excluded unit test files; fix ArgumentException vs InvalidOperationException assertions for uid-empty guard methods
- Enable OAuth: remove Compile Remove for OAuthHandler.cs and Services/OAuth, uncomment OAuth methods and EnsureOAuthTokenIsValidAsync in ContentstackClient
- Fix service constructor calls in Term, Taxonomy, Webhook, Extension, AuditLog — remove legacy serializer first-arg pattern
- Update unit test count: 991 → 1,242 tests all passing1 parent d55fc73 commit f1df975
49 files changed
Lines changed: 420 additions & 626 deletions
File tree
- Contentstack.Management.Core.Tests
- IntegrationTest
- Contentstack.Management.Core.Unit.Tests
- Http
- Models
- Mokes
- Model
- Queryable
- Runtime/Contexts
- Utils
- Contentstack.Management.Core
- Models
- CustomExtension
- Queryable
- Services/OAuth
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
Lines changed: 0 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | 54 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
Lines changed: 71 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
404 | 405 | | |
405 | 406 | | |
406 | 407 | | |
407 | | - | |
408 | 408 | | |
409 | 409 | | |
410 | | - | |
411 | 410 | | |
412 | 411 | | |
413 | | - | |
414 | | - | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
415 | 435 | | |
416 | 436 | | |
417 | 437 | | |
418 | 438 | | |
419 | | - | |
420 | 439 | | |
421 | 440 | | |
422 | | - | |
423 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
424 | 465 | | |
425 | 466 | | |
426 | 467 | | |
427 | 468 | | |
428 | | - | |
429 | 469 | | |
430 | 470 | | |
431 | | - | |
432 | | - | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
433 | 494 | | |
434 | 495 | | |
435 | 496 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3664 | 3664 | | |
3665 | 3665 | | |
3666 | 3666 | | |
3667 | | - | |
| 3667 | + | |
3668 | 3668 | | |
3669 | 3669 | | |
3670 | 3670 | | |
| |||
0 commit comments