mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
[PR #706] [MERGED] Provide open api schema to dynamic examples generator so you can generate accurate data #1043
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/wiremock/WireMock.Net/pull/706
Author: @brunotarghetta
Created: 12/23/2021
Status: ✅ Merged
Merged: 12/28/2021
Merged by: @StefH
Base:
master← Head:GenerateDynamicExampleUsingOpenApiSchema📝 Commits (4)
4abe702Provide open api schema to dynamic examples generator so you can generate accurate data using settings like max-length in case of a string3cd94d8Rename Schema Property and add a dynamic examples generator with properties from settings like max-length7356578Remove blank lines957e3d8Add virtual to all public method in WireMockOpenApiParserExampleValues and ireMockOpenApiParserDynamicExampleValues to extend and overrides examples values📊 Changes
9 files changed (+188 additions, -52 deletions)
View changed files
➕
examples/WireMock.Net.OpenApiParser.ConsoleApp/DynamicDataGeneration.cs(+26 -0)➕
examples/WireMock.Net.OpenApiParser.ConsoleApp/OpenApiFiles/Swagger_Customer_V2.0.json(+73 -0)📝
examples/WireMock.Net.OpenApiParser.ConsoleApp/Program.cs(+45 -27)📝
examples/WireMock.Net.OpenApiParser.ConsoleApp/Run.cs(+7 -5)📝
examples/WireMock.Net.OpenApiParser.ConsoleApp/WireMock.Net.OpenApiParser.ConsoleApp.csproj(+3 -0)📝
src/WireMock.Net.OpenApiParser/Settings/IWireMockOpenApiParserExampleValues.cs(+7 -1)📝
src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserDynamicExampleValues.cs(+12 -9)📝
src/WireMock.Net.OpenApiParser/Settings/WireMockOpenApiParserExampleValues.cs(+13 -10)📝
src/WireMock.Net.OpenApiParser/Utils/ExampleValueGenerator.cs(+2 -0)📄 Description
@StefH Having ope api Schema we can use settings like max-length in case of a string to generate more accurate mock data when you implement your dynamic examples
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.