Skip to content

Commit dc544f1

Browse files
authored
fix: patternProperties should also be walked as a reference (LEGO#133)
1 parent 0679627 commit dc544f1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/LEGO.AsyncAPI/Services/AsyncApiWalker.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,17 @@ internal void Walk(AsyncApiSchema schema, bool isComponent = false)
386386
this.Walk("additionalProperties", () => this.Walk(schema.AdditionalProperties));
387387
}
388388

389+
if (schema.PatternProperties != null)
390+
{
391+
this.Walk("patternProperties", () =>
392+
{
393+
foreach (var item in schema.PatternProperties)
394+
{
395+
this.Walk(item.Key, () => this.Walk(item.Value));
396+
}
397+
});
398+
}
399+
389400
if (schema.PropertyNames != null)
390401
{
391402
this.Walk("propertyNames", () => this.Walk(schema.PropertyNames));

0 commit comments

Comments
 (0)