31 references to JsonSchema
Microsoft.Extensions.AI.Abstractions (31)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (29)
112
return CompleteSchema(ref state, new
JsonSchema
{ Ref = existingJsonPointer });
159
JsonSchema discriminatorSchema =
new
() { Constant = discriminatorNode };
210
schema =
new
()
337
return CompleteSchema(ref state,
new
()
355
return CompleteSchema(ref state,
new
()
379
return CompleteSchema(ref state,
new
()
386
new
JsonSchema
417
return 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 },
664
return new
JsonSchema
668
new
JsonSchema
{ Type = schemaType, Pattern = pattern },
669
new
JsonSchema
{ Enum = new() { (JsonNode)"NaN", (JsonNode)"Infinity", (JsonNode)"-Infinity" } },
674
return new
JsonSchema
{ Type = schemaType, Pattern = pattern };
749
return
new
() { Type = JsonSchemaType.String };
761
return
new
() { Enum = enumValues };
764
return
new
() { Type = JsonSchemaType.Integer };
src\Shared\JsonSchemaExporter\JsonSchemaExporter.JsonSchema.cs (2)
470
schema = new
JsonSchema
{ Not = JsonSchema.CreateTrueSchema() };
473
schema = new
JsonSchema
();