33 references to JsonSchema
Microsoft.Extensions.AI.Abstractions (33)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (31)
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() 586[typeof(bool)] = _ => new JsonSchema { Type = JsonSchemaType.Boolean }, 605[typeof(char)] = _ => new JsonSchema { Type = JsonSchemaType.String, MinLength = 1, MaxLength = 1 }, 606[typeof(string)] = _ => new JsonSchema { Type = JsonSchemaType.String }, 607[typeof(byte[])] = _ => new JsonSchema { Type = JsonSchemaType.String }, 608[typeof(Memory<byte>)] = _ => new JsonSchema { Type = JsonSchemaType.String }, 609[typeof(ReadOnlyMemory<byte>)] = _ => new JsonSchema { Type = JsonSchemaType.String }, 610[typeof(DateTime)] = _ => new JsonSchema { Type = JsonSchemaType.String, Format = "date-time" }, 611[typeof(DateTimeOffset)] = _ => new JsonSchema { Type = JsonSchemaType.String, Format = "date-time" }, 612[typeof(TimeSpan)] = _ => new JsonSchema 620[typeof(DateOnly)] = _ => new JsonSchema { Type = JsonSchemaType.String, Format = "date" }, 621[typeof(TimeOnly)] = _ => new JsonSchema { Type = JsonSchemaType.String, Format = "time" }, 623[typeof(Guid)] = _ => new JsonSchema { Type = JsonSchemaType.String, Format = "uuid" }, 624[typeof(Uri)] = _ => new JsonSchema { Type = JsonSchemaType.String, Format = "uri" }, 625[typeof(Version)] = _ => new JsonSchema 636[typeof(JsonObject)] = _ => new JsonSchema { Type = JsonSchemaType.Object }, 637[typeof(JsonArray)] = _ => new JsonSchema { Type = JsonSchemaType.Array }, 668return new JsonSchema 672new JsonSchema { Type = schemaType, Pattern = pattern }, 673new JsonSchema { Enum = new() { (JsonNode)"NaN", (JsonNode)"Infinity", (JsonNode)"-Infinity" } }, 678return new JsonSchema { Type = schemaType, Pattern = pattern }; 753return new() { Type = JsonSchemaType.String }; 765return new() { Enum = enumValues }; 768return new() { Type = JsonSchemaType.Integer };
src\Shared\JsonSchemaExporter\JsonSchemaExporter.JsonSchema.cs (2)
470schema = new JsonSchema { Not = JsonSchema.CreateTrueSchema() }; 473schema = new JsonSchema();