BlazorOpenApi/BlazorOpenApi/Controls/DiscriminatorControl.razor
Alexander Shabarshov a154bd9b8c Refactor OpenAPI usage in Razor components
Removed `@using Microsoft.OpenApi.Models` and related namespaces from various Razor component files to streamline OpenAPI model usage. Updated null checks to include opening braces for improved readability. Modified `_Imports.razor` to include new namespaces `BlazorOpenApi` and `BlazorOpenApi.Controls`, while removing outdated OpenAPI imports.
2025-03-26 09:48:47 +00:00

29 lines
647 B
Plaintext

@if (Value != null)
{
<div class="descriminator">
<Text Value="@Value.PropertyName" />
<table>
<thead>
<tr>
<th>From</th>
<th>To</th>
</tr>
</thead>
<tbody>
@foreach (var item in Value.Mapping)
{
<tr>
<td>@item.Key</td>
<td>@item.Value</td>
</tr>
}
</tbody>
</table>
</div>
}
@code {
[Parameter]
public OpenApiDiscriminator? Value { get; set; }
}