diff --git a/CHANGELOG.md b/CHANGELOG.md index f04211281..fb2849694 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 1.4.27 (17 November 2021) +- [#678](https://github.com/WireMock-Net/WireMock.Net/pull/678) - Support RequestBody [feature] contributed by [leolplex](https://github.com/leolplex) +- [#680](https://github.com/WireMock-Net/WireMock.Net/pull/680) - Support examples in properties [feature] contributed by [leolplex](https://github.com/leolplex) +- [#681](https://github.com/WireMock-Net/WireMock.Net/pull/681) - Support enums in properties [feature] contributed by [leolplex](https://github.com/leolplex) + # 1.4.26 (04 November 2021) - [#670](https://github.com/WireMock-Net/WireMock.Net/pull/670) - Improve method MapSchemaToObject to support array and object [feature] contributed by [leolplex](https://github.com/leolplex) - [#673](https://github.com/WireMock-Net/WireMock.Net/pull/673) - Support examples random data generation contributed by [leolplex](https://github.com/leolplex) diff --git a/Directory.Build.props b/Directory.Build.props index 7b489e985..804f0553c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ - 1.4.26 + 1.4.27 See CHANGELOG.md WireMock.Net-Logo.png https://github.com/WireMock-Net/WireMock.Net diff --git a/Generate-ReleaseNotes.cmd b/Generate-ReleaseNotes.cmd index 6844afdf1..84994a183 100644 --- a/Generate-ReleaseNotes.cmd +++ b/Generate-ReleaseNotes.cmd @@ -1,6 +1,6 @@ rem https://github.com/StefH/GitHubReleaseNotes -SET version=1.4.26 +SET version=1.4.27 GitHubReleaseNotes --output CHANGELOG.md --skip-empty-releases --exclude-labels question invalid doc duplicate --version %version% --token %GH_TOKEN% diff --git a/PackageReleaseNotes.txt b/PackageReleaseNotes.txt index d42268410..af7262a91 100644 --- a/PackageReleaseNotes.txt +++ b/PackageReleaseNotes.txt @@ -1,7 +1,6 @@ -# 1.4.26 (04 November 2021) -- #670 Improve method MapSchemaToObject to support array and object [feature] -- #673 Support examples random data generation -- #675 Support basepath from servers -- #676 Fix random generate data in url no spaces [feature] +# 1.4.27 (17 November 2021) +- #678 Support RequestBody [feature] +- #680 Support examples in properties [feature] +- #681 Support enums in properties [feature] The full release notes can be found here: https://github.com/WireMock-Net/WireMock.Net/blob/master/CHANGELOG.md \ No newline at end of file diff --git a/src/WireMock.Net.OpenApiParser/Utils/ExampleValueGenerator.cs b/src/WireMock.Net.OpenApiParser/Utils/ExampleValueGenerator.cs index d3512ddc2..a9073f878 100644 --- a/src/WireMock.Net.OpenApiParser/Utils/ExampleValueGenerator.cs +++ b/src/WireMock.Net.OpenApiParser/Utils/ExampleValueGenerator.cs @@ -1,7 +1,8 @@ -using System; +using System; using System.Collections.Generic; using Microsoft.OpenApi.Any; using Microsoft.OpenApi.Models; +using Stef.Validation; using WireMock.Net.OpenApiParser.Extensions; using WireMock.Net.OpenApiParser.Settings; using WireMock.Net.OpenApiParser.Types; @@ -14,7 +15,8 @@ internal class ExampleValueGenerator public ExampleValueGenerator(WireMockOpenApiParserSettings settings) { - _settings = settings ?? throw new ArgumentNullException(nameof(settings)); + _settings = Guard.NotNull(settings, nameof(settings)); + if (_settings.DynamicExamples) { _settings.ExampleValues = new WireMockOpenApiParserDynamicExampleValues(); diff --git a/src/WireMock.Net.OpenApiParser/WireMock.Net.OpenApiParser.csproj b/src/WireMock.Net.OpenApiParser/WireMock.Net.OpenApiParser.csproj index 0284b6b58..c2f045a63 100644 --- a/src/WireMock.Net.OpenApiParser/WireMock.Net.OpenApiParser.csproj +++ b/src/WireMock.Net.OpenApiParser/WireMock.Net.OpenApiParser.csproj @@ -22,11 +22,11 @@ - + - +