Description
When using AsyncAPI v3 with a valid schema definition and $ref in the message payload, the UI only displays object without rendering its properties.
The issue appears to originate from incorrect schema deserialization in the Razor view (_V3Schema.cshtml), where the entire V3SchemaDefinition object is deserialized instead of its inner Schema property.
Expected behavior
Schema properties (e.g. title, sub) should be displayed in the UI under both:
components.schemas
- message payloads
Actual behavior
Only the object type is shown, without any properties rendered.
Example AsyncAPI document
Schema
{
"components": {
"schemas": {
"SampleMessage": {
"type": "object",
"properties": {
"title": { "type": "string" },
"sub": { "type": "integer" }
},
"required": ["sub"]
}
}
}
}
Payload
"payload": {
"$ref": "#/components/schemas/SampleMessage"
}
Root cause
In _V3Schema.cshtml, schema deserialization is implemented as:
JsonSerializer.Deserialize<JsonSchema>(
JsonSerializer.SerializeToText(Model.Definition))
However, Model.Definition is a wrapper (V3SchemaDefinition) with structure:
{
"schemaFormat": "...",
"schema": { ...actual schema... }
}
As a result, the deserializer receives an incorrect structure and fails to properly extract properties.
Proposed fix
Replace:
JsonSerializer.SerializeToText(Model.Definition)
with:
JsonSerializer.SerializeToText(Model.Definition.Schema)
This ensures that only the actual schema object is deserialized.
Environment
- AsyncAPI .NET SDK version: 3.0.6
- UI: Razor Pages (Neuroglia.AsyncApi.UI)
Notes
- The AsyncAPI document is valid and renders correctly in other tools.
- The issue is isolated to the UI rendering layer.
Suggested next step
If this behavior is confirmed, I can submit a Pull Request with the fix.
Description
When using AsyncAPI v3 with a valid schema definition and
$refin the message payload, the UI only displaysobjectwithout rendering its properties.The issue appears to originate from incorrect schema deserialization in the Razor view (
_V3Schema.cshtml), where the entireV3SchemaDefinitionobject is deserialized instead of its innerSchemaproperty.Expected behavior
Schema properties (e.g.
title,sub) should be displayed in the UI under both:components.schemasActual behavior
Only the
objecttype is shown, without any properties rendered.Example AsyncAPI document
Schema
{ "components": { "schemas": { "SampleMessage": { "type": "object", "properties": { "title": { "type": "string" }, "sub": { "type": "integer" } }, "required": ["sub"] } } } }Payload
Root cause
In
_V3Schema.cshtml, schema deserialization is implemented as:However,
Model.Definitionis a wrapper (V3SchemaDefinition) with structure:{ "schemaFormat": "...", "schema": { ...actual schema... } }As a result, the deserializer receives an incorrect structure and fails to properly extract
properties.Proposed fix
Replace:
with:
This ensures that only the actual schema object is deserialized.
Environment
Notes
Suggested next step
If this behavior is confirmed, I can submit a Pull Request with the fix.