Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Playground/Playground.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.12.0" />
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="9.0.4" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public ElasticsearchProductRegistration(Type markerType) : this()
_metaHeaderProvider = new DefaultMetaHeaderProvider(clientVersionInfo, identifier);

// Only set this if we have a version.
// If we don't have a version we won't apply the vendor-based REST API compatibility Accept header.
// If we don't have a version, we won't apply the vendor-based REST API compatibility Accept header.
if (clientVersionInfo.Major > 0)
_clientMajorVersion = clientVersionInfo.Major;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Elastic.Elasticsearch.Xunit" Version="0.4.3" />
<PackageReference Include="Elastic.Elasticsearch.Xunit" Version="0.7.0" />
<PackageReference Include="coverlet.collector" Version="3.1.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>

<PackageReference Include="Elastic.Clients.Elasticsearch" Version="8.15.8" />
<PackageReference Include="Elastic.Clients.Elasticsearch" Version="9.0.4" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.10" />
<PackageReference Include="Xunit.Extensions.Ordering" Version="1.4.5" />
<PackageReference Include="coverlet.collector" Version="6.0.1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ public class ApiCompatibilityHeaderTests : AssemblyServerTestsBase
public ApiCompatibilityHeaderTests(TransportTestServer instance) : base(instance) { }

[Fact]
public async Task AddsExpectedVendorInformationForRestApiCompaitbility()
public async Task AddsExpectedVendorInformationForRestApiCompatibility()
{
var requestInvoker = new TrackingRequestInvoker(responseMessage =>
{
responseMessage.RequestMessage.Content.Headers.ContentType.MediaType.Should().Be("application/vnd.elasticsearch+json");
var parameter = responseMessage.RequestMessage.Content.Headers.ContentType.Parameters.Single();
parameter.Name.Should().Be("compatible-with");
parameter.Value.Should().Be("8");
parameter.Value.Should().Be("9");

var acceptValues = responseMessage.RequestMessage.Headers.GetValues("Accept");
acceptValues.Single().Replace(" ", "").Should().Be("application/vnd.elasticsearch+json;compatible-with=8");
acceptValues.Single().Replace(" ", "").Should().Be("application/vnd.elasticsearch+json;compatible-with=9");

var contentTypeValues = responseMessage.RequestMessage.Content.Headers.GetValues("Content-Type");
contentTypeValues.Single().Replace(" ", "").Should().Be("application/vnd.elasticsearch+json;compatible-with=8");
contentTypeValues.Single().Replace(" ", "").Should().Be("application/vnd.elasticsearch+json;compatible-with=9");
});

var nodePool = new SingleNodePool(Server.Uri);
Expand Down
Loading