14 references to DerivedTypes
Microsoft.AspNetCore.OpenApi (3)
Extensions\JsonNodeSchemaExtensions.cs (2)
374foreach (var derivedType in polymorphismOptions.DerivedTypes) 421&& !polymorphismOptions.DerivedTypes.Any(type => type.DerivedType == context.TypeInfo.Type);
Services\Schemas\OpenApiSchemaService.cs (1)
270foreach (var derivedType in jsonTypeInfo.PolymorphismOptions.DerivedTypes)
Microsoft.Extensions.AI.Abstractions (3)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (2)
125if (parentPolymorphicTypeInfo is null && typeInfo.PolymorphismOptions is { DerivedTypes.Count: > 0 } polyOptions) 131List<JsonDerivedType> derivedTypes = polyOptions.DerivedTypes.ToList();
Utilities\AIJsonUtilities.cs (1)
68(typeInfo.PolymorphismOptions ??= new()).DerivedTypes.Add(new(contentType, typeDiscriminatorId));
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\DistributedCachingChatClientTest.cs (1)
636typeInfo.PolymorphismOptions!.DerivedTypes.Add(new JsonDerivedType(t, t.Name));
Shared (2)
JsonSchemaExporter\JsonSchemaExporter.cs (2)
125if (parentPolymorphicTypeInfo is null && typeInfo.PolymorphismOptions is { DerivedTypes.Count: > 0 } polyOptions) 131List<JsonDerivedType> derivedTypes = polyOptions.DerivedTypes.ToList();
System.Text.Json (5)
System\Text\Json\Schema\JsonSchemaExporter.cs (3)
97if (parentPolymorphicTypeInfo is null && typeInfo.PolymorphismOptions is { DerivedTypes.Count: > 0 } polyOptions) 102List<JsonDerivedType> derivedTypes = new(polyOptions.DerivedTypes); 397foreach (JsonDerivedType derivedType in typeInfo.PolymorphismOptions.DerivedTypes)
System\Text\Json\Serialization\Metadata\JsonPolymorphismOptions.cs (1)
117(options ??= new()).DerivedTypes.Add(new JsonDerivedType(attr.DerivedType, attr.TypeDiscriminator));
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (1)
35foreach ((Type derivedType, object? typeDiscriminator) in polymorphismOptions.DerivedTypes)