Skip to content

Commit 3d24e4b

Browse files
authored
Merge pull request #44 from SmartBear-DevRel/fix/v4_pacts_with_no_req_body
Fix/v4 pacts with no req body
2 parents 8d11b91 + 86f72a0 commit 3d24e4b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.github/gitversion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
next-version: 0.8.0
1+
next-version: 0.8.1
22
assembly-versioning-scheme: MajorMinorPatch
33
assembly-file-versioning-scheme: MajorMinorPatchTag
44
assembly-informational-format: '{InformationalVersion}'

src/Explore.Cli/MappingHelpers/Pact/PactMappingHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static Dictionary<string, object> CreatePactPathsDictionary(object reques
6666
};
6767

6868
// //add request body
69-
if (v4Request.Body.Content != null)
69+
if (v4Request.Body?.Content != null)
7070
{
7171
var examplesJson = new Dictionary<string, object>
7272
{

src/Explore.Cli/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ public static async Task<int> Main(string[] args)
6969
var baseUri = new Option<string>(name: "--base-uri", description: "The base uri to use for all imported requests. ie: http://localhost:3000") { IsRequired = false };
7070
baseUri.AddAlias("-b");
7171
var ignorePactFileSchemaValidationResult = new Option<bool>(name: "--ignore-pact-schema-verification-result", description: "Ignore pact schema verification result, performed prior to upload") { IsRequired = false };
72-
var importPactFileCommand = new Command("import-pact-file") { exploreCookie, importFilePath, baseUri, verbose };
72+
var importPactFileCommand = new Command("import-pact-file") { exploreCookie, importFilePath, baseUri, verbose, ignorePactFileSchemaValidationResult };
7373
importPactFileCommand.Description = "Import a Pact file (v2/v3/v4) into SwaggerHub Explore (HTTP interactions only)";
7474
rootCommand.Add(importPactFileCommand);
7575

7676
importPactFileCommand.SetHandler(async (ec, fp, b, v, ignorePactFileSchemaValidationResult) =>
77-
{ await ImportPactFile(ec, fp, b, v); }, exploreCookie, importFilePath, baseUri, verbose, ignorePactFileSchemaValidationResult);
77+
{ await ImportPactFile(ec, fp, b, v, ignorePactFileSchemaValidationResult); }, exploreCookie, importFilePath, baseUri, verbose, ignorePactFileSchemaValidationResult);
7878

7979
AnsiConsole.Write(new FigletText("Explore.Cli").Color(new Color(133, 234, 45)));
8080

0 commit comments

Comments
 (0)