Skip to content

Commit f5785df

Browse files
author
github-actions[bot]
committed
feat: Updated OpenAPI spec
1 parent 623d920 commit f5785df

27 files changed

+248
-876
lines changed

src/libs/Ollama/Generated/Ollama..JsonSerializerContext.g.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,12 @@ namespace Ollama
1313
DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull,
1414
Converters = new global::System.Type[]
1515
{
16-
typeof(global::Ollama.JsonConverters.ResponseFormatEnumJsonConverter),
17-
typeof(global::Ollama.JsonConverters.ResponseFormatEnumNullableJsonConverter),
1816
typeof(global::Ollama.JsonConverters.MessageRoleJsonConverter),
1917
typeof(global::Ollama.JsonConverters.MessageRoleNullableJsonConverter),
2018
typeof(global::Ollama.JsonConverters.ToolTypeJsonConverter),
2119
typeof(global::Ollama.JsonConverters.ToolTypeNullableJsonConverter),
22-
typeof(global::Ollama.JsonConverters.DoneReasonEnumJsonConverter),
23-
typeof(global::Ollama.JsonConverters.DoneReasonEnumNullableJsonConverter),
24-
typeof(global::Ollama.JsonConverters.CreateModelStatusEnumJsonConverter),
25-
typeof(global::Ollama.JsonConverters.CreateModelStatusEnumNullableJsonConverter),
2620
typeof(global::Ollama.JsonConverters.CapabilityJsonConverter),
2721
typeof(global::Ollama.JsonConverters.CapabilityNullableJsonConverter),
28-
typeof(global::Ollama.JsonConverters.PullModelStatusEnumJsonConverter),
29-
typeof(global::Ollama.JsonConverters.PullModelStatusEnumNullableJsonConverter),
3022
typeof(global::Ollama.JsonConverters.PushModelResponseStatusJsonConverter),
3123
typeof(global::Ollama.JsonConverters.PushModelResponseStatusNullableJsonConverter),
3224
typeof(global::Ollama.JsonConverters.ResponseFormatJsonConverter),

src/libs/Ollama/Generated/Ollama.JsonConverters.CreateModelStatus.g.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ public class CreateModelStatusJsonConverter : global::System.Text.Json.Serializa
2929
}
3030

3131
readerCopy = reader;
32-
global::Ollama.CreateModelStatusEnum? value2 = default;
32+
string? value2 = default;
3333
try
3434
{
35-
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Ollama.CreateModelStatusEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Ollama.CreateModelStatusEnum> ??
36-
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Ollama.CreateModelStatusEnum).Name}");
35+
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<string> ??
36+
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}");
3737
value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo);
3838
}
3939
catch (global::System.Text.Json.JsonException)
@@ -53,8 +53,8 @@ public class CreateModelStatusJsonConverter : global::System.Text.Json.Serializa
5353
}
5454
else if (value2 != null)
5555
{
56-
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Ollama.CreateModelStatusEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Ollama.CreateModelStatusEnum> ??
57-
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Ollama.CreateModelStatusEnum).Name}");
56+
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<string> ??
57+
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}");
5858
_ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
5959
}
6060

@@ -78,8 +78,8 @@ public override void Write(
7878
}
7979
else if (value.IsValue2)
8080
{
81-
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Ollama.CreateModelStatusEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Ollama.CreateModelStatusEnum> ??
82-
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Ollama.CreateModelStatusEnum).Name}");
81+
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<string?> ??
82+
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}");
8383
global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo);
8484
}
8585
}

src/libs/Ollama/Generated/Ollama.JsonConverters.CreateModelStatusEnum.g.cs

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/libs/Ollama/Generated/Ollama.JsonConverters.CreateModelStatusEnumNullable.g.cs

Lines changed: 0 additions & 60 deletions
This file was deleted.

src/libs/Ollama/Generated/Ollama.JsonConverters.DoneReason.g.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ public class DoneReasonJsonConverter : global::System.Text.Json.Serialization.Js
2929
}
3030

3131
readerCopy = reader;
32-
global::Ollama.DoneReasonEnum? value2 = default;
32+
string? value2 = default;
3333
try
3434
{
35-
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Ollama.DoneReasonEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Ollama.DoneReasonEnum> ??
36-
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Ollama.DoneReasonEnum).Name}");
35+
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<string> ??
36+
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}");
3737
value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo);
3838
}
3939
catch (global::System.Text.Json.JsonException)
@@ -53,8 +53,8 @@ public class DoneReasonJsonConverter : global::System.Text.Json.Serialization.Js
5353
}
5454
else if (value2 != null)
5555
{
56-
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Ollama.DoneReasonEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Ollama.DoneReasonEnum> ??
57-
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Ollama.DoneReasonEnum).Name}");
56+
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<string> ??
57+
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}");
5858
_ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
5959
}
6060

@@ -78,8 +78,8 @@ public override void Write(
7878
}
7979
else if (value.IsValue2)
8080
{
81-
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Ollama.DoneReasonEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Ollama.DoneReasonEnum> ??
82-
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Ollama.DoneReasonEnum).Name}");
81+
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<string?> ??
82+
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}");
8383
global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo);
8484
}
8585
}

src/libs/Ollama/Generated/Ollama.JsonConverters.DoneReasonEnum.g.cs

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/libs/Ollama/Generated/Ollama.JsonConverters.DoneReasonEnumNullable.g.cs

Lines changed: 0 additions & 60 deletions
This file was deleted.

src/libs/Ollama/Generated/Ollama.JsonConverters.PullModelStatus.g.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ public class PullModelStatusJsonConverter : global::System.Text.Json.Serializati
2929
}
3030

3131
readerCopy = reader;
32-
global::Ollama.PullModelStatusEnum? value2 = default;
32+
string? value2 = default;
3333
try
3434
{
35-
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Ollama.PullModelStatusEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Ollama.PullModelStatusEnum> ??
36-
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Ollama.PullModelStatusEnum).Name}");
35+
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<string> ??
36+
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}");
3737
value2 = global::System.Text.Json.JsonSerializer.Deserialize(ref readerCopy, typeInfo);
3838
}
3939
catch (global::System.Text.Json.JsonException)
@@ -53,8 +53,8 @@ public class PullModelStatusJsonConverter : global::System.Text.Json.Serializati
5353
}
5454
else if (value2 != null)
5555
{
56-
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Ollama.PullModelStatusEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Ollama.PullModelStatusEnum> ??
57-
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Ollama.PullModelStatusEnum).Name}");
56+
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<string> ??
57+
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}");
5858
_ = global::System.Text.Json.JsonSerializer.Deserialize(ref reader, typeInfo);
5959
}
6060

@@ -78,8 +78,8 @@ public override void Write(
7878
}
7979
else if (value.IsValue2)
8080
{
81-
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(global::Ollama.PullModelStatusEnum), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Ollama.PullModelStatusEnum> ??
82-
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(global::Ollama.PullModelStatusEnum).Name}");
81+
var typeInfo = typeInfoResolver.GetTypeInfo(typeof(string), options) as global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<string?> ??
82+
throw new global::System.InvalidOperationException($"Cannot get type info for {typeof(string).Name}");
8383
global::System.Text.Json.JsonSerializer.Serialize(writer, value.Value2, typeInfo);
8484
}
8585
}

0 commit comments

Comments
 (0)