Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces IsJsonContent extensions for parameter matching with Mockolate, enabling JSON HTTP content validation in mocked HTTP clients. The changes add comprehensive support for matching JSON bodies with various options including custom media types, additional property handling, and JSON document parsing options.
Changes:
- Added
IsJsonContent()extension methods for matching JSON HTTP content - Implemented JSON body comparison with support for objects, arrays, primitives, and nested structures
- Added option to ignore additional properties when matching JSON content
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/aweXpect.Mockolate.Tests/Web/ItExtensionsTests.cs | Added test class container for new JSON content tests |
| Tests/aweXpect.Mockolate.Tests/Web/ItExtensionsTests.HttpContentTests.IsJsonContentTests.cs | Comprehensive test coverage for JSON content matching including primitives, objects, arrays, and various options |
| Tests/aweXpect.Mockolate.Api.Tests/Expected/aweXpect.Mockolate_net8.0.txt | Updated API surface with new AweXpectItExtensions types and methods for JSON content |
| Tests/aweXpect.Mockolate.Api.Tests/Expected/aweXpect.Mockolate_net10.0.txt | Updated API surface with new AweXpectItExtensions types and methods for JSON content |
| Source/aweXpect.Mockolate/Web/ItExtensions.HttpContent.IsJsonContent.cs | Core implementation of JSON content parameter matching with support for body comparison, media type validation, and property ignoring |
| Directory.Packages.props | Updated aweXpect.Core dependency version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🚀 Benchmark ResultsDetails
|
|
|
This is addressed in release v1.0.0. |



This PR introduces
IsJsonContentextensions for parameter matching with Mockolate, enabling JSON HTTP content validation in mocked HTTP clients. The changes add comprehensive support for matching JSON bodies with various options including custom media types, additional property handling, and JSON document parsing options.Key Changes:
IsJsonContent()extension methods for matching JSON HTTP content