12 references to TypePropertyName
Microsoft.Extensions.AI.Abstractions (12)
Utilities\AIJsonUtilities.Schema.Create.cs (11)
144
schema[
TypePropertyName
] = "object"; // Method schemas always hardcode the type as "object".
244
return new JsonObject { [
TypePropertyName
] = null };
281
if (ctx.TypeInfo.Type.IsEnum && objSchema.ContainsKey(EnumPropertyName) && !objSchema.ContainsKey(
TypePropertyName
))
283
objSchema.InsertAtStart(
TypePropertyName
, "string");
304
obj[
TypePropertyName
] = new JsonArray { (JsonNode)numericType, (JsonNode)"null" };
308
obj[
TypePropertyName
] = (JsonNode)numericType;
319
if (objSchema.TryGetPropertyValue(
TypePropertyName
, out JsonNode? typeKeyWord) &&
325
objSchema[
TypePropertyName
] = new JsonArray { (JsonNode)typeValue, (JsonNode)"null" };
330
if (nullableElement.IsEnum && objSchema.ContainsKey(EnumPropertyName) && !objSchema.ContainsKey(
TypePropertyName
))
332
objSchema.InsertAtStart(
TypePropertyName
, new JsonArray { (JsonNode)"string", (JsonNode)"null" });
631
if (!schema.TryGetPropertyValue(
TypePropertyName
, out JsonNode? typeNode))
Utilities\AIJsonUtilities.Schema.Transform.cs (1)
145
schemaObj.TryGetPropertyValue(
TypePropertyName
, out JsonNode? typeSchema) &&