13 references to GetJsonSchemaAsNode
Microsoft.AspNetCore.OpenApi (1)
Services\Schemas\OpenApiSchemaService.cs (1)
471var schema = JsonSchemaExporter.GetJsonSchemaAsNode(_jsonSerializerOptions, key.Type, _configuration);
Microsoft.Extensions.AI.Abstractions (1)
Utilities\AIJsonUtilities.Schema.Create.cs (1)
260return serializerOptions.GetJsonSchemaAsNode(type, exporterOptions);
Shared.Tests (11)
JsonSchemaExporter\JsonSchemaExporterTests.cs (11)
34JsonNode schema = options.GetJsonSchemaAsNode(testData.Type, (JsonSchemaExporterOptions?)testData.ExporterOptions); 46JsonNode schema = options.GetJsonSchemaAsNode(testData.Type, (JsonSchemaExporterOptions?)testData.ExporterOptions); 60JsonNode schema = Options.GetJsonSchemaAsNode(referenceType, config); 76JsonNode schema = Options.GetJsonSchemaAsNode(referenceType, config); 126JsonNode schema = Options.GetJsonSchemaAsNode(typeof(object), config); 133JsonNode schema = Options.GetJsonSchemaAsNode(typeof(TestTypes.PocoDisallowingUnmappedMembers)); 141Assert.Throws<ArgumentNullException>(() => ((JsonSerializerOptions)null!).GetJsonSchemaAsNode(typeof(int))); 142Assert.Throws<ArgumentNullException>(() => Options.GetJsonSchemaAsNode(type: null!)); 150Assert.Throws<InvalidOperationException>(() => options.GetJsonSchemaAsNode(typeof(int))); 157var ex = Assert.Throws<InvalidOperationException>(() => options.GetJsonSchemaAsNode(typeof(TestTypes.SimplePoco))); 167var ex = Assert.Throws<NotSupportedException>(() => options.GetJsonSchemaAsNode(typeof(TestTypes.SimplePoco)));