diff --git a/BlazorOpenApi/Controls/MediaTypeControl.razor b/BlazorOpenApi/Controls/MediaTypeControl.razor
new file mode 100644
index 0000000..7c94556
--- /dev/null
+++ b/BlazorOpenApi/Controls/MediaTypeControl.razor
@@ -0,0 +1,26 @@
+@using Microsoft.OpenApi.Models
+
+@if (Value != null)
+{
+
+
+
+
+
+ @if (Value.Examples.Count > 0)
+ {
+ foreach (var (n, v) in Value.Examples)
+ {
+
+ }
+ }
+
+
+}
+
+@code {
+ [Parameter]
+ public string? Key { get; set; }
+ [Parameter]
+ public OpenApiMediaType? Value { get; set; }
+}
diff --git a/BlazorOpenApi/Controls/OperationControl.razor b/BlazorOpenApi/Controls/OperationControl.razor
index bbfb371..2c9f2e0 100644
--- a/BlazorOpenApi/Controls/OperationControl.razor
+++ b/BlazorOpenApi/Controls/OperationControl.razor
@@ -49,6 +49,7 @@
}
-
+
@if (val.Content.Count > 0)
{
@@ -36,7 +36,7 @@
| @k |
-
+
@if (v.Encoding.Count > 0)
{
@@ -91,7 +91,7 @@
{
@key
-
+
}
diff --git a/BlazorOpenApi/Controls/SchemaChildControl.razor b/BlazorOpenApi/Controls/SchemaChildControl.razor
index da99099..6b1691f 100644
--- a/BlazorOpenApi/Controls/SchemaChildControl.razor
+++ b/BlazorOpenApi/Controls/SchemaChildControl.razor
@@ -6,7 +6,7 @@
@if (Value.Type == "array")
{
-
+
@@ -14,7 +14,7 @@
}
else if (Value.Type == "object")
{
-
+
@foreach (var p in Value.Properties)
@@ -63,6 +63,8 @@
public string? Title { get; set; }
[Parameter]
public bool Required { get; set; }
+ [Parameter]
+ public bool Collapsed { get; set; } = true;
private string TitleText => (string.IsNullOrWhiteSpace(Title) ? Value?.Title : Title) ?? "";
@@ -74,11 +76,10 @@
return "";
var nullable = Value.Nullable ? "?" : "";
- var itemsType = $"{Value.Items?.Type ?? "-string-"}{nullable}";
if (Value.MinItems != null || Value.MaxItems != null)
- return $"{itemsType} [{(Value.MinItems == null ? "" : Value.MinItems.Value)}..{(Value.MaxItems == null ? "" : Value.MaxItems.Value)}]";
- return $"{itemsType} []";
+ return $"array{nullable} [{(Value.MinItems == null ? "" : Value.MinItems.Value)}..{(Value.MaxItems == null ? "" : Value.MaxItems.Value)}]";
+ return $"array{nullable} []";
}
}
diff --git a/BlazorOpenApi/Controls/SchemaControl.razor b/BlazorOpenApi/Controls/SchemaControl.razor
index 177c005..64a4a23 100644
--- a/BlazorOpenApi/Controls/SchemaControl.razor
+++ b/BlazorOpenApi/Controls/SchemaControl.razor
@@ -3,7 +3,7 @@
@if ( ResolvedValue != null )
{
}
@@ -15,6 +15,8 @@
public string? Title { get; set; }
[Parameter]
public bool Required { get; set; }
+ [Parameter]
+ public bool Collapsed { get; set; } = true;
[CascadingParameter]
public OpenApiDocument? Api { get; set; }
diff --git a/BlazorOpenApi/wwwroot/css/openapi-ui.css b/BlazorOpenApi/wwwroot/css/openapi-ui.css
index 227d31c..6ef7161 100644
--- a/BlazorOpenApi/wwwroot/css/openapi-ui.css
+++ b/BlazorOpenApi/wwwroot/css/openapi-ui.css
@@ -224,7 +224,26 @@
}
.r-encoding{}
-.schema {}
+.request {
+}
+
+.rb-body {
+}
+.rb-title {
+ font-weight: bold;
+}
+
+.mt-body {
+ margin-left: 20px;
+}
+.mt-header-text {
+ color: var(--oa-fg-1);
+ font-weight: bold;
+}
+
+
+.schema {
+}
.s-additional-props {}
.s-props {}
.s-title {
| |