304 Commits

Author SHA1 Message Date
Stef Heyenrath
5885324dfb Fix WithProbability logic (#1367)
* Fix WithProbability logic

* .

* FIX

* Update src/WireMock.Net.Minimal/Owin/MappingMatcher.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-22 10:16:59 +02:00
Stef Heyenrath
7a187dfb78 Add more examples for WithGraphQLSchema (#1335) 2025-07-23 09:34:31 +02:00
Stef Heyenrath
f80925c1fb Add Scenario set State method (#1322)
* Add SetScenarioState

* add tests

* summary

* .

* 1.8.13-preview-01

* fix

* fix name
2025-06-23 08:03:11 +02:00
Stef Heyenrath
7b93b2668d Fix TypeLoader (#1320)
* no ilmerge

* .

* .

* nullable

* .UsingNuGet

* fix

* .

* directoriesToSearch

* .
2025-06-15 11:44:09 +02:00
Stef Heyenrath
acd6592562 remove some old console projects 2025-06-13 13:07:48 +02:00
Sébastien Crocquesel
2a010dcd42 Use default resource cleaning behavior in test (#1316) 2025-06-12 22:06:58 +02:00
Stef Heyenrath
96eca4262a Create WireMock.Net.MimePart project (#1300)
* Create WireMock.Net.MimePart project

* .

* REFACTOR

* ILRepack

* --

* ...

* x

* x

* .

* fix

* public class MimePartMatcher

* shared

* min

* .

* <!--<DelaySign>true</DelaySign>-->

* Update README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-24 12:17:42 +02:00
Stef Heyenrath
7596967fcc Grpc: Fix parsing null value for google.protobuf.Timestamp (#1293)
* Add another example for Grpc client + mapping

* <PackageReference Include="ProtoBufJsonConverter" Version="0.9.0" />
2025-05-10 12:53:18 +02:00
Stef Heyenrath
249b3562ab Update AzureADAuthenticationMatcher to support V2 Azure AAD tokens (#1288)
* Update AzureADAuthenticationMatcher to support V2 Azure AAD tokens

* fix ;-)

* add tests

* Update test/WireMock.Net.Tests/Authentication/MockJwtSecurityTokenHandler.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* .

* WIREMOCK_AAD_TENANT

* update logging

* throw new SecurityTokenInvalidIssuerException($"tenant {extractedTenant} does not match {_tenant}.");

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-06 18:49:21 +02:00
Stef Heyenrath
cf0dcf5855 Revert changes to WireMock.Net.OpenApiParser (#1289)
* Revert changes to WireMock.Net.OpenApiParser

* revert
2025-05-02 07:18:35 +02:00
Stef Heyenrath
4368e3cde6 1.7.x (#1268)
* Fix construction of path in OpenApiParser (#1265)

* Server-Sent Events (#1269)

* Server Side Events

* fixes

* await HandleSseStringAsync(responseMessage, response, bodyData);

* 1.7.5-preview-01

* IBlockingQueue

* 1.7.5-preview-02 (03 April 2025)

* IBlockingQueue

* ...

* Support OpenApi V31 (#1279)

* Support OpenApi V31

* Update src/WireMock.Net.OpenApiParser/Extensions/OpenApiSchemaExtensions.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fx

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Add ProtoDefinitionHelper.FromDirectory (#1263)

* Add ProtoDefinitionHelper.FromDirectory

* .

* unix-windows

* move test

* imports in the proto files indeed should use a forward slash

* updates

* .

* private Func<IdOrTexts> ProtoDefinitionFunc()

* OpenTelemetry

* .

* fix path utils

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-23 11:51:44 +02:00
JvE-iO
29bf9b42f8 Add exception message to logging when mapping fails due to an exception. (#1248)
* Add exception message to logging when mapping fails due to an exception.

* Revert "Add exception message to logging when mapping fails due to an exception."

This reverts commit eb7cf46c95.

* Fix loggers with improved exception logging.
2025-01-30 10:59:22 +01:00
Stef Heyenrath
52b00d74a9 Add "AddUrl" to WireMockContainerBuilder to support grpc (#1246)
* Add "AddUrl" to WireMockContainerBuilder to support grpc

* fix

* fix for windows

* wip

* fix !

* change some example code
2025-01-29 22:09:17 +01:00
Stef Heyenrath
12d2219752 Disable DynamicLinq to fix CVE (#1242)
* Disable DynamicLinq

* Disable DynamicLinq functionality
2025-01-22 10:30:52 +01:00
Stef Heyenrath
ab7ce37e7e Fix WireMockContainerBuilder (duplicate entries) (#1222) 2024-12-31 18:24:29 +01:00
Stef Heyenrath
2a19b4491f WireMock.Net.Testcontainers: implement watching the static mapping folder for changes (#1189)
* WireMock.Net.Testcontainers: implement watching the static mapping files + folder for changes

* ReloadStaticMappings

* fix

* .

* .

* .

* .

* .

* .

* .

* CopyAsync

* <VersionPrefix>1.6.7-preview-02</VersionPrefix>

* <VersionPrefix>1.6.7-preview-03</VersionPrefix>
2024-12-15 11:31:25 +01:00
dependabot[bot]
45755adae4 Bump System.Text.Json in /examples/WireMock.Net.Console.Net472.Classic (#1190)
Bumps [System.Text.Json](https://github.com/dotnet/runtime) from 8.0.4 to 8.0.5.
- [Release notes](https://github.com/dotnet/runtime/releases)
- [Commits](https://github.com/dotnet/runtime/compare/v8.0.4...v8.0.5)

---
updated-dependencies:
- dependency-name: System.Text.Json
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-15 21:46:08 +02:00
Stef Heyenrath
eb7e6c397f 1.6.6 2024-10-01 17:43:18 +02:00
Stef Heyenrath
f56ecf943d Fix StaticMappingsPath in WireMockContainerBuilder (#1187)
* Fix StaticMappingsPath in WireMockContainerBuilder

* .
2024-10-01 17:39:59 +02:00
Stef Heyenrath
42306d1864 Add WireMock.Net.AspNetCore.Middleware (#1175)
* Add WireMock.Net.AspNetCore.Middleware

* .

* WireMock.Net.Middleware.Tests

* .

* X-WireMock-Response-Delay
2024-09-27 20:39:57 +02:00
Stef Heyenrath
dca3fd0260 WireMock.Net.Testcontainers: Use 'sheyenrath/wiremock.net-alpine' image as default for Linux (#1181)
* WireMock.Net.Testcontainers: Use 'sheyenrath/wiremock.net-alpine' image as default for Linux

* ...

* .

* WithBindMount

* fix

* r

* .
2024-09-27 19:10:51 +02:00
Stef Heyenrath
088444024f Allow setting Content-Length header on the response (#1158)
* Allow setting Content-Length header on the response

* fix?
2024-08-16 12:14:42 +02:00
Stef Heyenrath
4b12f3419f Add Aspire Extension (#1109)
* WireMock.Net.Aspire

* .

* xxx

* nuget

* [CodeFactor] Apply fixes

* ut

* t

* **WireMock.Net.Aspire**

* .

* t

* .

* .

* .

* TESTS

* docker utils

* Install .NET Aspire workload

* 4

* 4!

* projects: '**/test/**/*.csproj'

* script: 'dotnet workload install aspire'

* projects: '**/test/**/*.csproj'

* coverage

* WithWatchStaticMappings

* Admin

* typo

* port

* fix

* .

* x

* ...

* wait

* readme

* x

* 2

* async

* <Version>0.0.1-preview-03</Version>

* ...

* fix aspire

* admin/pwd

* Install .NET Aspire workload

* 0.0.1-preview-04

* WaitForHealthAsync

* ...

* IsHealthyAsync

* .

* add eps

* name: 'Execute Aspire Tests'

* name: Install .NET Aspire workload

* .

* dotnet test

* remove duplicate

* .

* cc

* dotnet tool install --global coverlet.console

* -*

* merge

* /d:sonar.pullrequest.provider=github

* <Version>0.0.1-preview-05</Version>

* // Copyright © WireMock.Net

* .

---------

Co-authored-by: codefactor-io <support@codefactor.io>
2024-07-27 18:53:59 +02:00
Stef Heyenrath
6055b0df1a Fix some SonarCloud warnings (#1138)
* r

* hdr

* sc

* StyleCop.Analyzers
2024-07-22 21:24:30 +02:00
Stef Heyenrath
54edf0bebc Add link to TIOBE Index on main page + fix issues (#1137)
* Add TIOBE + include SonarAnalyzer.CSharp

* .

* cp

* Copyright © WireMock.Net

* more fixes

* fix

* xpath

* if (Matchers == null || !Matchers.Any())

* if (Matchers != null)

* ?

* .

* .
2024-07-18 18:06:04 +02:00
dependabot[bot]
be2698d246 Bump System.Text.Json in /examples/WireMock.Net.Console.Net472.Classic (#1135)
Bumps System.Text.Json from 4.7.2 to 8.0.4.

---
updated-dependencies:
- dependency-name: System.Text.Json
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 08:17:00 +02:00
Stef Heyenrath
8b03307a94 Add some methods to the BodyModelBuilder (#1116)
* Add some methods to the BodyModelBuilder

* .
2024-06-08 09:26:21 +02:00
Stef Heyenrath
ea4ea95866 Fix Request.Create().WithBodyAsJson(...) (#1111)
* Fix Request.Create().WithBodyAsJson(...)

* [CodeFactor] Apply fixes

---------

Co-authored-by: codefactor-io <support@codefactor.io>
2024-05-25 09:09:03 +02:00
Stef Heyenrath
dd35cea44e When only Port is provided, bind to * (Fixes #1100) (#1107)
* Fix for #1100

* tst
2024-05-22 16:33:35 +02:00
Stef Heyenrath
2c001f661d Add support to bind to ip-address instead of only localhost (#1100)
* Add support to bind to ip-address instead of only localhost

* .

* .
2024-05-17 21:46:07 +02:00
Stef Heyenrath
add3f662ba Fix build for .NET Framework example projects #1103 2024-05-17 10:05:54 +02:00
Stef Heyenrath
ef9baf3472 Add example for IRequestMessage.BodyAsMimeMessage 2024-04-06 13:59:51 +02:00
Stef Heyenrath
6ac95cf57d Add Grpc ProtoBuf support (request-response) (#1047)
* ProtoBuf

* .

* x

* ---

* x

* fx

* ...

* sc

* ...

* .

* groen

* x

* fix tests

* ok!?

* fix tests

* fix tests

* !

* x

* 6

* .

* x

* ivaluematcher

* transformer

* .

* sc

* .

* mapping

* x

* tra

* com

* ...

* .

* .

* .

* AddProtoDefinition

* .

* set

* grpahj

* .

* .

* IdOrText

* ...

* async

* async2

* .

* t

* nuget

* <PackageReference Include="ProtoBufJsonConverter" Version="0.2.0-preview-04" />

* http version

* tests

* .WithHttpVersion("2")

* <PackageReference Include="ProtoBufJsonConverter" Version="0.2.0" />

* HttpVersionParser
2024-02-16 17:16:51 +01:00
dependabot[bot]
057cd6c963 Bump System.IdentityModel.Tokens.Jwt (#1055)
Bumps [System.IdentityModel.Tokens.Jwt](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet) from 6.25.0 to 6.34.0.
- [Release notes](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/releases)
- [Changelog](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/dev/CHANGELOG.md)
- [Commits](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/compare/6.25.0...6.34.0)

---
updated-dependencies:
- dependency-name: System.IdentityModel.Tokens.Jwt
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-23 21:48:41 +01:00
Stef Heyenrath
4721b73a16 Update Handlebars Transformer logic (ReplaceNodeOptions) (#1036)
* Update Handlebars Transformer logic (ReplaceNodeOptions)

* okeee

* EvaluateAndKeep = Evaluate

* fix?

* linux

* _

* tt

* xxx

* fx

* x

* fix test
2023-12-21 20:02:58 +01:00
Stef Heyenrath
0c6129e86b Add ProxyUrlReplaceSettings to Response (#1026) 2023-12-10 09:57:37 +01:00
Stef Heyenrath
8b91cec457 Add .NET 8 (#1018)
* Add .NET 8

* 'Use .NET 8'

* tests 8

* 8

* tc8

* ci

* CI
2023-12-04 18:05:18 +01:00
Stef Heyenrath
fb3ae53e1c GraphQL - custom scalar support (#1012)
* x

* CustomScalars

* more tests

* .

* add or set

* ...

* x
2023-12-04 18:02:03 +01:00
Stef Heyenrath
62fa4666b5 Add unit tests for HttpClient with WebProxy (#1010)
* Add test for SSL / Https

* Add unit tests for HttpClient with WebProxy

* cert.pem

* x

* skip

* example google

* revert

* host tests

* sonar
2023-10-14 17:55:29 +02:00
Stef Heyenrath
b9a8ee4145 Fixed logic for SaveUnmatchedRequests (#1002)
* Fixed logic for SaveUnmatchedRequests

* fix
2023-09-21 11:38:01 +02:00
Stef Heyenrath
b986633eca Fix MimeKitLite NuGet include (#989)
* Fix 500

* MimeKiteLite : fix NuGet include

* .
2023-08-04 10:44:53 +02:00
Stef Heyenrath
4688f556b5 Add MultiPart/MimePart Request Matcher (#981)
* wip

* .

* mm

* x

* .

* .

* .

* tests

* .

* more tests

* trans

* x

* win

* fix

* .

* tests
2023-08-03 15:55:46 +02:00
Stef Heyenrath
a58ead7b4e Upgrade to Handlebars.Net.Helpers 2.4.0 to update XPath.SelectTokens and XPath.EvaluateToString (#976)
* Upgrade to Handlebars.Net.Helpers 2.4.0 to update XPath.SelectTokens and XPath.EvaluateToString

* fix
2023-07-20 21:49:00 +02:00
Stef Heyenrath
b495eb83b1 Add GraphQL Schema matching (#964)
* Add GrapQLMatcher

* tests

* x

* .

* .

* RequestMessageGraphQLMatcher

* .

* more tests

* tests

* ...

* ms

* .

* more tests

* GraphQL.NET !!!

* .

* executionResult

* nw

* sonarcloud
2023-07-07 21:43:46 +02:00
dependabot[bot]
7a914481e5 Bump System.Linq.Dynamic.Core (#963)
Bumps [System.Linq.Dynamic.Core](https://github.com/zzzprojects/System.Linq.Dynamic.Core) from 1.2.23 to 1.3.0.
- [Release notes](https://github.com/zzzprojects/System.Linq.Dynamic.Core/releases)
- [Changelog](https://github.com/zzzprojects/System.Linq.Dynamic.Core/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zzzprojects/System.Linq.Dynamic.Core/compare/v1.2.23...v1.3.0)

---
updated-dependencies:
- dependency-name: System.Linq.Dynamic.Core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-28 07:58:03 +02:00
dependabot[bot]
1ad836659d Bump System.Linq.Dynamic.Core (#962)
Bumps [System.Linq.Dynamic.Core](https://github.com/zzzprojects/System.Linq.Dynamic.Core) from 1.2.23 to 1.3.0.
- [Release notes](https://github.com/zzzprojects/System.Linq.Dynamic.Core/releases)
- [Changelog](https://github.com/zzzprojects/System.Linq.Dynamic.Core/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zzzprojects/System.Linq.Dynamic.Core/compare/v1.2.23...v1.3.0)

---
updated-dependencies:
- dependency-name: System.Linq.Dynamic.Core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-28 07:57:50 +02:00
Stef Heyenrath
7ca70309cb Support setting WireMockServerSettings via Environment (#954)
* Support parsing environment variables (WireMockServerSettings__)

* case ignore

* fix

* SimpleSettingsParserTests

* .

* int

* more test
2023-06-22 10:35:21 +02:00
Stef Heyenrath
dc4c8d1dba WireMock.Net.Testcontainers (#948)
* WireMock.Net.Testcontainers

* .

* logger?

* .

* .

* WatchStaticMappings

* linux

* .

* --

* ContainerInfo

* .

* 02

* .

* fix

* .
2023-06-11 13:55:57 +02:00
Stef Heyenrath
a8775c3b77 Include WireMockOpenApiParser project (#916)
* Fix some nullability warnings for WireMockOpenApiParser

* .

* .

* .

* opt

* FromText

* ab

* .

* private const string AdminOpenApi = "/__admin/openapi";

* fix test

* rnd

* .

* urldetails

* 0

* ,

* .

* tests

* .

* CompressionUtilsTests

* ut

* .
2023-04-08 21:25:17 +02:00
Stef Heyenrath
7426bf76ee Add 'Data' to response which can be used during transforming the response (#893)
* Add 'Data' to response which can be used during transforming the response

* md

* hb

* fix

* Linq

* fix test

* v4

* 14

* .

* x

* remove

* s
2023-03-09 17:20:34 +01:00