31 references to JsonSchema
Microsoft.Extensions.AI.Abstractions (31)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (29)
112return CompleteSchema(ref state, new JsonSchema { Ref = existingJsonPointer }); 159JsonSchema discriminatorSchema = new() { Constant = discriminatorNode }; 210schema = new() 337return CompleteSchema(ref state, new() 355return CompleteSchema(ref state, new() 379return CompleteSchema(ref state, new() 386new JsonSchema 417return CompleteSchema(ref state, new() 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" }, 608[typeof(TimeSpan)] = _ => new JsonSchema 619[typeof(Guid)] = _ => new JsonSchema { Type = JsonSchemaType.String, Format = "uuid" }, 620[typeof(Uri)] = _ => new JsonSchema { Type = JsonSchemaType.String, Format = "uri" }, 621[typeof(Version)] = _ => new JsonSchema 632[typeof(JsonObject)] = _ => new JsonSchema { Type = JsonSchemaType.Object }, 633[typeof(JsonArray)] = _ => new JsonSchema { Type = JsonSchemaType.Array }, 664return new JsonSchema 668new JsonSchema { Type = schemaType, Pattern = pattern }, 669new JsonSchema { Enum = new() { (JsonNode)"NaN", (JsonNode)"Infinity", (JsonNode)"-Infinity" } }, 674return new JsonSchema { Type = schemaType, Pattern = pattern }; 749return new() { Type = JsonSchemaType.String }; 761return new() { Enum = enumValues }; 764return new() { Type = JsonSchemaType.Integer };
src\Shared\JsonSchemaExporter\JsonSchemaExporter.JsonSchema.cs (2)
470schema = new JsonSchema { Not = JsonSchema.CreateTrueSchema() }; 473schema = new JsonSchema();