14 references to TypePropertyName
Microsoft.Extensions.AI.Abstractions (14)
Utilities\AIJsonUtilities.Schema.Create.cs (13)
146
schema[
TypePropertyName
] = "object"; // Method schemas always hardcode the type as "object".
251
return new JsonObject { [
TypePropertyName
] = null };
288
if (ctx.TypeInfo.Type.IsEnum && objSchema.ContainsKey(EnumPropertyName) && !objSchema.ContainsKey(
TypePropertyName
))
290
objSchema.InsertAtStart(
TypePropertyName
, "string");
311
obj[
TypePropertyName
] = new JsonArray { (JsonNode)numericType, (JsonNode)"null" };
315
obj[
TypePropertyName
] = (JsonNode)numericType;
326
if (objSchema.TryGetPropertyValue(
TypePropertyName
, out JsonNode? typeKeyWord) &&
332
objSchema[
TypePropertyName
] = new JsonArray { (JsonNode)typeValue, (JsonNode)"null" };
337
if (nullableElement.IsEnum && objSchema.ContainsKey(EnumPropertyName) && !objSchema.ContainsKey(
TypePropertyName
))
339
objSchema.InsertAtStart(
TypePropertyName
, new JsonArray { (JsonNode)"string", (JsonNode)"null" });
430
if (obj[
TypePropertyName
] is JsonNode typeNode && typeNode.GetValueKind() is JsonValueKind.String && typeNode.GetValue<string>() is "string")
443
if (obj[
TypePropertyName
] is JsonNode typeNode && typeNode.GetValueKind() is JsonValueKind.String && typeNode.GetValue<string>() is "string")
533
if (obj[
TypePropertyName
] is JsonNode typeNode && typeNode.GetValueKind() is JsonValueKind.String && typeNode.GetValue<string>() is "string")
Utilities\AIJsonUtilities.Schema.Transform.cs (1)
145
schemaObj.TryGetPropertyValue(
TypePropertyName
, out JsonNode? typeSchema) &&