26 writes to Type
Microsoft.Extensions.AI.Abstractions (26)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (25)
198
derivedSchema.
Type
= JsonSchemaType.Any;
212
Type
= schemaType,
339
Type
= JsonSchemaType.Object,
357
Type
= JsonSchemaType.Array,
381
Type
= JsonSchemaType.Object,
388
Type
= JsonSchemaType.Array,
419
Type
= JsonSchemaType.Object,
582
[typeof(bool)] = _ => new JsonSchema {
Type
= JsonSchemaType.Boolean },
601
[typeof(char)] = _ => new JsonSchema {
Type
= JsonSchemaType.String, MinLength = 1, MaxLength = 1 },
602
[typeof(string)] = _ => new JsonSchema {
Type
= JsonSchemaType.String },
603
[typeof(byte[])] = _ => new JsonSchema {
Type
= JsonSchemaType.String },
604
[typeof(Memory<byte>)] = _ => new JsonSchema {
Type
= JsonSchemaType.String },
605
[typeof(ReadOnlyMemory<byte>)] = _ => new JsonSchema {
Type
= JsonSchemaType.String },
606
[typeof(DateTime)] = _ => new JsonSchema {
Type
= JsonSchemaType.String, Format = "date-time" },
607
[typeof(DateTimeOffset)] = _ => new JsonSchema {
Type
= JsonSchemaType.String, Format = "date-time" },
611
Type
= JsonSchemaType.String,
619
[typeof(Guid)] = _ => new JsonSchema {
Type
= JsonSchemaType.String, Format = "uuid" },
620
[typeof(Uri)] = _ => new JsonSchema {
Type
= JsonSchemaType.String, Format = "uri" },
624
Type
= JsonSchemaType.String,
632
[typeof(JsonObject)] = _ => new JsonSchema {
Type
= JsonSchemaType.Object },
633
[typeof(JsonArray)] = _ => new JsonSchema {
Type
= JsonSchemaType.Array },
668
new JsonSchema {
Type
= schemaType, Pattern = pattern },
674
return new JsonSchema {
Type
= schemaType, Pattern = pattern };
749
return new() {
Type
= JsonSchemaType.String };
764
return new() {
Type
= JsonSchemaType.Integer };
src\Shared\JsonSchemaExporter\JsonSchemaExporter.JsonSchema.cs (1)
323
Type
|= JsonSchemaType.Null;
5 references to Type
Microsoft.Extensions.AI.Abstractions (5)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (2)
180
schemaType = derivedSchema.
Type
;
182
else if (schemaType != derivedSchema.
Type
)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.JsonSchema.cs (3)
293
Count(
Type
!= JsonSchemaType.Any);
321
if (
Type
!= JsonSchemaType.Any)
361
if (MapSchemaType(
Type
) is JsonNode type)