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".
249
return new JsonObject { [
TypePropertyName
] = null };
286
if (ctx.TypeInfo.Type.IsEnum && objSchema.ContainsKey(EnumPropertyName) && !objSchema.ContainsKey(
TypePropertyName
))
288
objSchema.InsertAtStart(
TypePropertyName
, "string");
309
obj[
TypePropertyName
] = new JsonArray { (JsonNode)numericType, (JsonNode)"null" };
313
obj[
TypePropertyName
] = (JsonNode)numericType;
324
if (objSchema.TryGetPropertyValue(
TypePropertyName
, out JsonNode? typeKeyWord) &&
330
objSchema[
TypePropertyName
] = new JsonArray { (JsonNode)typeValue, (JsonNode)"null" };
335
if (nullableElement.IsEnum && objSchema.ContainsKey(EnumPropertyName) && !objSchema.ContainsKey(
TypePropertyName
))
337
objSchema.InsertAtStart(
TypePropertyName
, new JsonArray { (JsonNode)"string", (JsonNode)"null" });
636
if (!schema.TryGetPropertyValue(
TypePropertyName
, out JsonNode? typeNode))
Utilities\AIJsonUtilities.Schema.Transform.cs (1)
145
schemaObj.TryGetPropertyValue(
TypePropertyName
, out JsonNode? typeSchema) &&