Skip to content

fix: discriminator mapping references don't get a document when created from DOM #2353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
```

BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.3476)
BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.3981)
11th Gen Intel Core i7-1185G7 3.00GHz, 1 CPU, 8 logical and 4 physical cores
.NET SDK 8.0.408
[Host] : .NET 8.0.15 (8.0.1525.16413), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
ShortRun : .NET 8.0.15 (8.0.1525.16413), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
.NET SDK 8.0.409
[Host] : .NET 8.0.16 (8.0.1625.21506), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
ShortRun : .NET 8.0.16 (8.0.1625.21506), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI

Job=ShortRun IterationCount=3 LaunchCount=1
WarmupCount=3

```
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Gen2 | Allocated |
|------------- |-------------:|--------------:|-------------:|-----------:|-----------:|----------:|-------------:|
| PetStoreYaml | 450.5 μs | 59.26 μs | 3.25 μs | 58.5938 | 11.7188 | - | 377.15 KB |
| PetStoreJson | 172.8 μs | 123.46 μs | 6.77 μs | 39.0625 | 7.8125 | - | 239.29 KB |
| GHESYaml | 943,452.7 μs | 137,685.49 μs | 7,547.01 μs | 66000.0000 | 21000.0000 | 3000.0000 | 389463.91 KB |
| GHESJson | 468,401.8 μs | 300,711.80 μs | 16,483.03 μs | 41000.0000 | 15000.0000 | 3000.0000 | 250934.62 KB |
| PetStoreYaml | 470.3 μs | 138.05 μs | 7.57 μs | 58.5938 | 11.7188 | - | 380.53 KB |
| PetStoreJson | 166.0 μs | 43.84 μs | 2.40 μs | 39.0625 | 8.7891 | - | 242.67 KB |
| GHESYaml | 915,406.4 μs | 714,492.62 μs | 39,163.75 μs | 68000.0000 | 22000.0000 | 4000.0000 | 395800.98 KB |
| GHESJson | 470,609.4 μs | 264,698.88 μs | 14,509.04 μs | 42000.0000 | 15000.0000 | 3000.0000 | 257270.45 KB |
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Method,Job,AnalyzeLaunchVariance,EvaluateOverhead,MaxAbsoluteError,MaxRelativeError,MinInvokeCount,MinIterationTime,OutlierMode,Affinity,EnvironmentVariables,Jit,LargeAddressAware,Platform,PowerPlanMode,Runtime,AllowVeryLargeObjects,Concurrent,CpuGroups,Force,HeapAffinitizeMask,HeapCount,NoAffinitize,RetainVm,Server,Arguments,BuildConfiguration,Clock,EngineFactory,NuGetReferences,Toolchain,IsMutator,InvocationCount,IterationCount,IterationTime,LaunchCount,MaxIterationCount,MaxWarmupIterationCount,MemoryRandomization,MinIterationCount,MinWarmupIterationCount,RunStrategy,UnrollFactor,WarmupCount,Mean,Error,StdDev,Gen0,Gen1,Gen2,Allocated
PetStoreYaml,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,450.5 μs,59.26 μs,3.25 μs,58.5938,11.7188,0.0000,377.15 KB
PetStoreJson,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,172.8 μs,123.46 μs,6.77 μs,39.0625,7.8125,0.0000,239.29 KB
GHESYaml,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"943,452.7 μs","137,685.49 μs","7,547.01 μs",66000.0000,21000.0000,3000.0000,389463.91 KB
GHESJson,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"468,401.8 μs","300,711.80 μs","16,483.03 μs",41000.0000,15000.0000,3000.0000,250934.62 KB
PetStoreYaml,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,470.3 μs,138.05 μs,7.57 μs,58.5938,11.7188,0.0000,380.53 KB
PetStoreJson,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,166.0 μs,43.84 μs,2.40 μs,39.0625,8.7891,0.0000,242.67 KB
GHESYaml,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"915,406.4 μs","714,492.62 μs","39,163.75 μs",68000.0000,22000.0000,4000.0000,395800.98 KB
GHESJson,ShortRun,False,Default,Default,Default,Default,Default,Default,11111111,Empty,RyuJit,Default,X64,8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c,.NET 8.0,False,True,False,True,Default,Default,False,False,False,Default,Default,Default,Default,Default,Default,Default,Default,3,Default,1,Default,Default,Default,Default,Default,Default,16,3,"470,609.4 μs","264,698.88 μs","14,509.04 μs",42000.0000,15000.0000,3000.0000,257270.45 KB
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang='en'>
<head>
<meta charset='utf-8' />
<title>performance.Descriptions-20250409-150544</title>
<title>performance.Descriptions-20250514-154213</title>

<style type="text/css">
table { border-collapse: collapse; display: block; width: 100%; overflow: auto; }
Expand All @@ -13,11 +13,11 @@
</head>
<body>
<pre><code>
BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.3476)
BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.3981)
11th Gen Intel Core i7-1185G7 3.00GHz, 1 CPU, 8 logical and 4 physical cores
.NET SDK 8.0.408
[Host] : .NET 8.0.15 (8.0.1525.16413), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
ShortRun : .NET 8.0.15 (8.0.1525.16413), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
.NET SDK 8.0.409
[Host] : .NET 8.0.16 (8.0.1625.21506), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
ShortRun : .NET 8.0.16 (8.0.1625.21506), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
</code></pre>
<pre><code>Job=ShortRun IterationCount=3 LaunchCount=1
WarmupCount=3
Expand All @@ -26,10 +26,10 @@
<table>
<thead><tr><th>Method</th><th>Mean </th><th>Error </th><th>StdDev</th><th>Gen0</th><th>Gen1</th><th>Gen2</th><th>Allocated</th>
</tr>
</thead><tbody><tr><td>PetStoreYaml</td><td>450.5 &mu;s</td><td>59.26 &mu;s</td><td>3.25 &mu;s</td><td>58.5938</td><td>11.7188</td><td>-</td><td>377.15 KB</td>
</tr><tr><td>PetStoreJson</td><td>172.8 &mu;s</td><td>123.46 &mu;s</td><td>6.77 &mu;s</td><td>39.0625</td><td>7.8125</td><td>-</td><td>239.29 KB</td>
</tr><tr><td>GHESYaml</td><td>943,452.7 &mu;s</td><td>137,685.49 &mu;s</td><td>7,547.01 &mu;s</td><td>66000.0000</td><td>21000.0000</td><td>3000.0000</td><td>389463.91 KB</td>
</tr><tr><td>GHESJson</td><td>468,401.8 &mu;s</td><td>300,711.80 &mu;s</td><td>16,483.03 &mu;s</td><td>41000.0000</td><td>15000.0000</td><td>3000.0000</td><td>250934.62 KB</td>
</thead><tbody><tr><td>PetStoreYaml</td><td>470.3 &mu;s</td><td>138.05 &mu;s</td><td>7.57 &mu;s</td><td>58.5938</td><td>11.7188</td><td>-</td><td>380.53 KB</td>
</tr><tr><td>PetStoreJson</td><td>166.0 &mu;s</td><td>43.84 &mu;s</td><td>2.40 &mu;s</td><td>39.0625</td><td>8.7891</td><td>-</td><td>242.67 KB</td>
</tr><tr><td>GHESYaml</td><td>915,406.4 &mu;s</td><td>714,492.62 &mu;s</td><td>39,163.75 &mu;s</td><td>68000.0000</td><td>22000.0000</td><td>4000.0000</td><td>395800.98 KB</td>
</tr><tr><td>GHESJson</td><td>470,609.4 &mu;s</td><td>264,698.88 &mu;s</td><td>14,509.04 &mu;s</td><td>42000.0000</td><td>15000.0000</td><td>3000.0000</td><td>257270.45 KB</td>
</tr></tbody></table>
</body>
</html>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
```

BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.3476)
BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.3981)
11th Gen Intel Core i7-1185G7 3.00GHz, 1 CPU, 8 logical and 4 physical cores
.NET SDK 8.0.408
[Host] : .NET 8.0.15 (8.0.1525.16413), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
ShortRun : .NET 8.0.15 (8.0.1525.16413), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
.NET SDK 8.0.409
[Host] : .NET 8.0.16 (8.0.1625.21506), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI
ShortRun : .NET 8.0.16 (8.0.1625.21506), X64 RyuJIT AVX-512F+CD+BW+DQ+VL+VBMI

Job=ShortRun IterationCount=3 LaunchCount=1
WarmupCount=3

```
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|---------------------------- |-----------:|------------:|-----------:|-------:|-------:|----------:|
| EmptyApiCallback | 4.557 ns | 2.2807 ns | 0.1250 ns | 0.0051 | - | 32 B |
| EmptyApiComponents | 5.116 ns | 0.6915 ns | 0.0379 ns | 0.0166 | - | 104 B |
| EmptyApiContact | 3.759 ns | 3.1240 ns | 0.1712 ns | 0.0076 | - | 48 B |
| EmptyApiDiscriminator | 3.442 ns | 2.3747 ns | 0.1302 ns | 0.0064 | - | 40 B |
| EmptyDocument | 397.830 ns | 46.9921 ns | 2.5758 ns | 0.1807 | 0.0005 | 1136 B |
| EmptyApiEncoding | 3.879 ns | 3.0270 ns | 0.1659 ns | 0.0089 | - | 56 B |
| EmptyApiExample | 4.045 ns | 6.0543 ns | 0.3319 ns | 0.0089 | - | 56 B |
| EmptyApiExternalDocs | 3.455 ns | 2.1233 ns | 0.1164 ns | 0.0064 | - | 40 B |
| EmptyApiHeader | 4.633 ns | 3.8933 ns | 0.2134 ns | 0.0127 | - | 80 B |
| EmptyApiInfo | 4.462 ns | 4.0279 ns | 0.2208 ns | 0.0127 | - | 80 B |
| EmptyApiLicense | 3.670 ns | 1.6839 ns | 0.0923 ns | 0.0076 | - | 48 B |
| EmptyApiLink | 4.388 ns | 1.9826 ns | 0.1087 ns | 0.0115 | - | 72 B |
| EmptyApiMediaType | 3.857 ns | 1.4731 ns | 0.0807 ns | 0.0089 | - | 56 B |
| EmptyApiOAuthFlow | 3.810 ns | 1.1359 ns | 0.0623 ns | 0.0089 | - | 56 B |
| EmptyApiOAuthFlows | 3.979 ns | 5.5181 ns | 0.3025 ns | 0.0089 | - | 56 B |
| EmptyApiOperation | 72.530 ns | 230.3314 ns | 12.6252 ns | 0.0599 | 0.0001 | 376 B |
| EmptyApiParameter | 4.919 ns | 3.2142 ns | 0.1762 ns | 0.0153 | - | 96 B |
| EmptyApiPathItem | 3.966 ns | 0.7140 ns | 0.0391 ns | 0.0102 | - | 64 B |
| EmptyApiPaths | 56.222 ns | 32.3248 ns | 1.7718 ns | 0.0395 | - | 248 B |
| EmptyApiRequestBody | 3.683 ns | 2.3246 ns | 0.1274 ns | 0.0076 | - | 48 B |
| EmptyApiResponse | 3.864 ns | 0.9334 ns | 0.0512 ns | 0.0089 | - | 56 B |
| EmptyApiResponses | 49.325 ns | 7.2131 ns | 0.3954 ns | 0.0395 | - | 248 B |
| EmptyApiSchema | 12.565 ns | 2.0834 ns | 0.1142 ns | 0.0650 | - | 408 B |
| EmptyApiSecurityRequirement | 8.411 ns | 1.5393 ns | 0.0844 ns | 0.0166 | - | 104 B |
| EmptyApiSecurityScheme | 4.719 ns | 3.8028 ns | 0.2084 ns | 0.0140 | - | 88 B |
| EmptyApiServer | 3.626 ns | 0.4928 ns | 0.0270 ns | 0.0076 | - | 48 B |
| EmptyApiServerVariable | 3.589 ns | 0.2983 ns | 0.0164 ns | 0.0076 | - | 48 B |
| EmptyApiTag | 3.889 ns | 7.4113 ns | 0.4062 ns | 0.0076 | - | 48 B |
| Method | Mean | Error | StdDev | Median | Gen0 | Allocated |
|---------------------------- |-----------:|------------:|-----------:|-----------:|-------:|----------:|
| EmptyApiCallback | 4.120 ns | 1.7973 ns | 0.0985 ns | 4.170 ns | 0.0051 | 32 B |
| EmptyApiComponents | 11.965 ns | 56.2456 ns | 3.0830 ns | 12.490 ns | 0.0166 | 104 B |
| EmptyApiContact | 11.843 ns | 66.9375 ns | 3.6691 ns | 12.069 ns | 0.0076 | 48 B |
| EmptyApiDiscriminator | 5.461 ns | 41.2864 ns | 2.2630 ns | 4.184 ns | 0.0064 | 40 B |
| EmptyDocument | 447.453 ns | 307.9616 ns | 16.8804 ns | 440.505 ns | 0.1802 | 1136 B |
| EmptyApiEncoding | 4.933 ns | 10.6453 ns | 0.5835 ns | 5.094 ns | 0.0089 | 56 B |
| EmptyApiExample | 4.753 ns | 8.8503 ns | 0.4851 ns | 4.660 ns | 0.0089 | 56 B |
| EmptyApiExternalDocs | 4.035 ns | 2.4540 ns | 0.1345 ns | 4.079 ns | 0.0064 | 40 B |
| EmptyApiHeader | 5.239 ns | 5.4576 ns | 0.2991 ns | 5.067 ns | 0.0127 | 80 B |
| EmptyApiInfo | 5.183 ns | 5.2973 ns | 0.2904 ns | 5.125 ns | 0.0127 | 80 B |
| EmptyApiLicense | 4.250 ns | 3.7202 ns | 0.2039 ns | 4.236 ns | 0.0076 | 48 B |
| EmptyApiLink | 4.837 ns | 3.6203 ns | 0.1984 ns | 4.853 ns | 0.0115 | 72 B |
| EmptyApiMediaType | 4.388 ns | 2.8437 ns | 0.1559 ns | 4.341 ns | 0.0089 | 56 B |
| EmptyApiOAuthFlow | 4.318 ns | 2.7240 ns | 0.1493 ns | 4.249 ns | 0.0089 | 56 B |
| EmptyApiOAuthFlows | 4.473 ns | 4.8273 ns | 0.2646 ns | 4.339 ns | 0.0089 | 56 B |
| EmptyApiOperation | 63.983 ns | 208.7371 ns | 11.4416 ns | 60.687 ns | 0.0599 | 376 B |
| EmptyApiParameter | 4.958 ns | 0.7540 ns | 0.0413 ns | 4.975 ns | 0.0153 | 96 B |
| EmptyApiPathItem | 5.436 ns | 7.9092 ns | 0.4335 ns | 5.383 ns | 0.0102 | 64 B |
| EmptyApiPaths | 81.391 ns | 292.1156 ns | 16.0118 ns | 82.553 ns | 0.0395 | 248 B |
| EmptyApiRequestBody | 4.576 ns | 7.3893 ns | 0.4050 ns | 4.512 ns | 0.0076 | 48 B |
| EmptyApiResponse | 4.349 ns | 1.1732 ns | 0.0643 ns | 4.319 ns | 0.0089 | 56 B |
| EmptyApiResponses | 53.510 ns | 87.6669 ns | 4.8053 ns | 54.947 ns | 0.0395 | 248 B |
| EmptyApiSchema | 14.447 ns | 21.8422 ns | 1.1972 ns | 14.301 ns | 0.0650 | 408 B |
| EmptyApiSecurityRequirement | 8.445 ns | 5.3829 ns | 0.2951 ns | 8.298 ns | 0.0166 | 104 B |
| EmptyApiSecurityScheme | 6.039 ns | 12.4925 ns | 0.6848 ns | 5.960 ns | 0.0140 | 88 B |
| EmptyApiServer | 4.640 ns | 3.9936 ns | 0.2189 ns | 4.747 ns | 0.0076 | 48 B |
| EmptyApiServerVariable | 5.058 ns | 3.8031 ns | 0.2085 ns | 4.972 ns | 0.0076 | 48 B |
| EmptyApiTag | 4.763 ns | 8.7140 ns | 0.4776 ns | 4.711 ns | 0.0076 | 48 B |
Loading