Skip to content

Commit 00be237

Browse files
committed
Implement IUrlParameter on Time (#3222)
* Implement IUrlParameter on Time This commit implements IUrlParameter on Time so that the conversion to a string value happens when building the url. Add condition to UrlFormatProvider to convert TimeSpan to Time unit string value when building the url. Remove special case handling for Time and TimeSpan and re-run API generation Fixes #3220
1 parent d9df17c commit 00be237

File tree

10 files changed

+18725
-18719
lines changed

10 files changed

+18725
-18719
lines changed

.paket/Paket.Restore.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848

4949
<!-- Because ReadAllText is slow on osx/linux, try to find shasum and awk -->
5050
<PropertyGroup>
51-
<PaketRestoreCachedHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreCachedHasher)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum $(PaketRestoreCacheFile) | /usr/bin/awk '{ print $1 }'</PaketRestoreCachedHasher>
52-
<PaketRestoreLockFileHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreLockFileHash)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum $(PaketLockFilePath) | /usr/bin/awk '{ print $1 }'</PaketRestoreLockFileHasher>
51+
<PaketRestoreCachedHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreCachedHasher)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum "$(PaketRestoreCacheFile)" | /usr/bin/awk '{ print $1 }'</PaketRestoreCachedHasher>
52+
<PaketRestoreLockFileHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreLockFileHash)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum "$(PaketLockFilePath)" | /usr/bin/awk '{ print $1 }'</PaketRestoreLockFileHasher>
5353
</PropertyGroup>
5454

5555
<!-- If shasum and awk exist get the hashes -->

src/CodeGeneration/ApiGenerator/Views/RequestParameters.Generated.cshtml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ namespace Elasticsearch.Net
3838
else if (mm.Contains("field") && fieldType.Contains("string"))
3939
{
4040
fieldType = "object";
41-
}
42-
if (fieldType == "TimeSpan")
43-
{
44-
setter = mm + ".ToTimeUnit()";
4541
}
4642
<text>
4743
///<summary>@kv.Value.Description</summary>

src/CodeGeneration/ApiGenerator/Views/_Requests.Generated.cshtml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ namespace Nest
7777
fieldType = "Field";
7878
}
7979
var setter = "value";
80-
if (fieldType == "Time")
81-
{
82-
setter += ".ToString()";
83-
}
8480
<text>///<summary>@kv.Value.Description</summary>
8581
@if(!string.IsNullOrWhiteSpace(kv.Value.Obsolete))
8682
{

0 commit comments

Comments
 (0)