[PR #668] [CLOSED] Support Schema Example and Support AllOf in definitions #1024

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

📋 Pull Request Information

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

Base: masterHead: SupportSchemaExample


📝 Commits (6)

  • f0ce73f Support an Example within a Schema
  • eaf4ad1 Support AllOf in definitions
  • 749d9f0 Refactor MapSchemaAllOfToObject method and add test files
  • 49029fa Include schema examples
  • 5aa4b3a Refactor duplicate code, create method MapPropertyAsJObject
  • 69155dc Remove commented code

📊 Changes

5 files changed (+2385 additions, -19 deletions)

View changed files

examples/WireMock.Net.OpenApiParser.ConsoleApp/OpenApiFiles/Swagger_Petstore_V2.0.json (+269 -0)
examples/WireMock.Net.OpenApiParser.ConsoleApp/OpenApiFiles/Swagger_Petstore_V2.0.yaml (+732 -0)
examples/WireMock.Net.OpenApiParser.ConsoleApp/OpenApiFiles/Swagger_Petstore_V3.0.0.yaml (+109 -0)
examples/WireMock.Net.OpenApiParser.ConsoleApp/OpenApiFiles/Swagger_Petstore_V3.0.2.json (+1232 -0)
📝 src/WireMock.Net.OpenApiParser/Mappers/OpenApiPathsMapper.cs (+43 -19)

📄 Description

Hello @StefH,

In this opportunity I've noticed that in Swagger V 2.0 when I have an example in the schema Wiremock.net does not supports this kind of examples so I added it.

On the other hand I also noticed that when a schema has AllOf in the definitions Wiremock.net does not supports it so I added it.

I added the test swagger files in the last path.

Thanks.


🔄 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/668 **Author:** [@leolplex](https://github.com/leolplex) **Created:** 10/27/2021 **Status:** ❌ Closed **Base:** `master` ← **Head:** `SupportSchemaExample` --- ### 📝 Commits (6) - [`f0ce73f`](https://github.com/wiremock/WireMock.Net/commit/f0ce73fbf09c707498d39f1b16e4d7e417b0d6e5) Support an Example within a Schema - [`eaf4ad1`](https://github.com/wiremock/WireMock.Net/commit/eaf4ad1988b99bad234dac6e13bc1f2548665e9a) Support AllOf in definitions - [`749d9f0`](https://github.com/wiremock/WireMock.Net/commit/749d9f07d9bc9258028a30e8cd5a766557ea5d69) Refactor MapSchemaAllOfToObject method and add test files - [`49029fa`](https://github.com/wiremock/WireMock.Net/commit/49029faf3940a5b68167b8ea66ef2158dab48316) Include schema examples - [`5aa4b3a`](https://github.com/wiremock/WireMock.Net/commit/5aa4b3af9dd2ddcf20dc26d3fee260c0f766746e) Refactor duplicate code, create method MapPropertyAsJObject - [`69155dc`](https://github.com/wiremock/WireMock.Net/commit/69155dc201c4bfd6cf4d428c42436a8dee93ead7) Remove commented code ### 📊 Changes **5 files changed** (+2385 additions, -19 deletions) <details> <summary>View changed files</summary> ➕ `examples/WireMock.Net.OpenApiParser.ConsoleApp/OpenApiFiles/Swagger_Petstore_V2.0.json` (+269 -0) ➕ `examples/WireMock.Net.OpenApiParser.ConsoleApp/OpenApiFiles/Swagger_Petstore_V2.0.yaml` (+732 -0) ➕ `examples/WireMock.Net.OpenApiParser.ConsoleApp/OpenApiFiles/Swagger_Petstore_V3.0.0.yaml` (+109 -0) ➕ `examples/WireMock.Net.OpenApiParser.ConsoleApp/OpenApiFiles/Swagger_Petstore_V3.0.2.json` (+1232 -0) 📝 `src/WireMock.Net.OpenApiParser/Mappers/OpenApiPathsMapper.cs` (+43 -19) </details> ### 📄 Description Hello @StefH, In this opportunity I've noticed that in Swagger V 2.0 when I have an example in the schema Wiremock.net does not supports this kind of examples so I added it. On the other hand I also noticed that when a schema has `AllOf `in the definitions Wiremock.net does not supports it so I added it. I added the test swagger files in the last path. Thanks. --- <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:23 +01:00
adam closed this issue 2025-12-29 08:34:23 +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#1024