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