Skip to content

Commit 5186b00

Browse files
committed
Adjust handcrafted code
1 parent 6a017ed commit 5186b00

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Elastic.Clients.Elasticsearch/_Shared/Api/GetSourceResponse.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ namespace Elastic.Clients.Elasticsearch;
88

99
public partial class GetSourceResponse<TDocument>
1010
{
11-
[Obsolete($"Use '{nameof(Document)}' instead.")]
12-
public TDocument Body { get => Document; set => Document = value; }
11+
[Obsolete($"Use '{nameof(Source)}' instead.")]
12+
public TDocument Body { get => Source; set => Source = value; }
1313
}

src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetFieldMappingResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public bool TryGetProperty(string index, string field, [NotNullWhen(true)] out I
6060

6161
private IReadOnlyDictionary<string, FieldMapping>? MappingsFor(string index)
6262
{
63-
if (Values!.TryGetValue(index, out var indexMapping))
63+
if (!FieldMappings.TryGetValue(index, out var indexMapping))
6464
return null;
6565

6666
return indexMapping.Mappings;

src/Elastic.Clients.Elasticsearch/_Shared/Api/IndexManagement/GetMappingResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ public static class GetMappingResponseExtensions
1313
if (index.IsNullOrEmpty())
1414
return null;
1515

16-
return response.Values.TryGetValue(index, out var indexMappings) ? indexMappings.Mappings : null;
16+
return response.Mappings.TryGetValue(index, out var indexMappings) ? indexMappings.Mappings : null;
1717
}
1818
}

0 commit comments

Comments
 (0)