[PR #650] [CLOSED] Add ExactMatcher in headers open API #1014

Closed
opened 2025-12-29 08:34:21 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/wiremock/WireMock.Net/pull/650
Author: @leolplex
Created: 10/12/2021
Status: Closed

Base: masterHead: master


📝 Commits (10+)

  • 0b8537b Support edge case: first object, next an array.
  • edf15bf Add mapping to header parameters.
  • 0296d76 Merge branch 'WireMock-Net:master' into master
  • 355c3e7 Refactor the method MapHeadersParameters to MapHeaders
  • 3a1b80f Merge branch 'WireMock-Net:master' into master
  • 75b8eea Refactor method name 'cause is duplicate, only pass httpStatusCode when fail
  • afc5951 Merge branch 'WireMock-Net:master' into master
  • 83bce01 Commit question, how to use 'NotNullOrEmptyMatcher' in Request Header
  • a5c5437 Merge branch 'WireMock-Net:master' into master
  • d9e1dc2 Update OpenApiPathsMapper.cs

📄 Description

Hello,

I did some test over a real OpenAPI file and I want to have the header parameter but with different values not only ExactMatcher I was researching on the Wiki and I found the matcher "NotNullOrEmptyMatcher" but when I tried to call the method WithMappingFromOpenApiFile I 'm getting this error " The collection argument 'matchers' must contain at least one element."

Any idea how can I apply the Matcher "NotNullOrEmptyMatcher" to header parameters?

image


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/wiremock/WireMock.Net/pull/650 **Author:** [@leolplex](https://github.com/leolplex) **Created:** 10/12/2021 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (10+) - [`0b8537b`](https://github.com/wiremock/WireMock.Net/commit/0b8537b5ebd40c472ae3772a10e071702018da63) Support edge case: first object, next an array. - [`edf15bf`](https://github.com/wiremock/WireMock.Net/commit/edf15bf7796acc5a9c4d4142825eca9121278c97) Add mapping to header parameters. - [`0296d76`](https://github.com/wiremock/WireMock.Net/commit/0296d768307e164626dc522ade64ac65a7d371a4) Merge branch 'WireMock-Net:master' into master - [`355c3e7`](https://github.com/wiremock/WireMock.Net/commit/355c3e71fcbe44428a35bee9658f5bb8ae46a030) Refactor the method MapHeadersParameters to MapHeaders - [`3a1b80f`](https://github.com/wiremock/WireMock.Net/commit/3a1b80f6c2ce502041e6bb90761ae2d7ad8665a5) Merge branch 'WireMock-Net:master' into master - [`75b8eea`](https://github.com/wiremock/WireMock.Net/commit/75b8eea96796c0291c566df7a51817a2d31579c9) Refactor method name 'cause is duplicate, only pass httpStatusCode when fail - [`afc5951`](https://github.com/wiremock/WireMock.Net/commit/afc59513f43f8007f48fa261266c6f754f98093e) Merge branch 'WireMock-Net:master' into master - [`83bce01`](https://github.com/wiremock/WireMock.Net/commit/83bce018c87ea267a9ab113df57f625b69e85963) Commit question, how to use 'NotNullOrEmptyMatcher' in Request Header - [`a5c5437`](https://github.com/wiremock/WireMock.Net/commit/a5c5437e261f6026bbf0ac03a0a91ae6d054312e) Merge branch 'WireMock-Net:master' into master - [`d9e1dc2`](https://github.com/wiremock/WireMock.Net/commit/d9e1dc226865cf7bbf3bc07856d8d4fd7b5e4b83) Update OpenApiPathsMapper.cs ### 📄 Description Hello, I did some test over a real OpenAPI file and I want to have the header parameter but with different values not only ExactMatcher I was researching on the Wiki and I found the matcher "NotNullOrEmptyMatcher" but when I tried to call the method WithMappingFromOpenApiFile I 'm getting this error " The collection argument 'matchers' must contain at least one element." Any idea how can I apply the Matcher "NotNullOrEmptyMatcher" to header parameters? ![image](https://user-images.githubusercontent.com/11394398/136867189-40f1352c-3965-46d1-8486-e30ea1a9168c.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 08:34:21 +01:00
adam closed this issue 2025-12-29 08:34:21 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#1014