Skip to content

Commit

Permalink
Merge pull request #377 from commercetools/gen-sdk-updates
Browse files Browse the repository at this point in the history
Update generated SDKs
  • Loading branch information
kodiakhq[bot] authored Nov 12, 2024
2 parents b57cb3d + 9323a4c commit 6fcb4c2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.IO;
using commercetools.Sdk.Api.Models.ProductSearches;
using FluentAssertions;
using Xunit;

namespace commercetools.Api.Serialization.Tests
Expand Down Expand Up @@ -29,9 +28,9 @@ public void FacetDeserialization()
var count = Assert.IsAssignableFrom<IProductSearchFacetResultCount>(facets[1]);
Assert.Equal("supplierCounts", count.Name);
Assert.Equal(10, count.Value);

var serialize = serializerService.Serialize(deserialized);

Assert.Equal("{\"total\":0,\"offset\":0,\"limit\":0,\"facets\":[{\"name\":\"supplierName\",\"buckets\":[{\"key\":\"Example Inc.\",\"count\":77}]},{\"name\":\"supplierCounts\",\"value\":10}]}", serialize);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
using System.Text.Json.Serialization;
using commercetools.Sdk.Api.Models.Products;
using commercetools.Base.Serialization;
using commercetools.Base.Serialization.MapperTypeRetrievers;
using commercetools.Sdk.Api.Models.ProductSearches;
using commercetools.Sdk.Api.Serialization.MapperTypeRetrievers;
using Attribute = commercetools.Sdk.Api.Models.Products.Attribute;
using Type = System.Type;

namespace commercetools.Sdk.Api.Serialization.JsonConverters
Expand Down Expand Up @@ -69,7 +66,8 @@ public override void Write(Utf8JsonWriter writer, IProductSearchFacetResult valu
writer.WritePropertyName("buckets");
JsonSerializer.Serialize(writer, bucket.Buckets, options);
}
else if (value is ProductSearchFacetResultCount count) {
else if (value is ProductSearchFacetResultCount count)
{
writer.WritePropertyName("value");
JsonSerializer.Serialize(writer, count.Value, options);
}
Expand Down
1 change: 1 addition & 0 deletions reference.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0be69283d6aba9d3a2f895140378673f2f80f7b0
1 change: 1 addition & 0 deletions references.txt
Original file line number Diff line number Diff line change
Expand Up @@ -293,3 +293,4 @@ c8c2455221baca20421082b7715eaa0a712af7f1
41774e015e4f946bd57f0e2dc76522ed757860c4
d410bad973f2fe90ea8239c4cb586fe0cfc13856
6bb8d35316a92441d0a59417b49ad3a8c7037e45
605a1ff5cf861ca0d8e2711ca79374804f180b50

0 comments on commit 6fcb4c2

Please sign in to comment.