diff --git a/src/openapi2excel/Builders/WorksheetPartsBuilders/PropertiesTreeBuilder.cs b/src/openapi2excel/Builders/WorksheetPartsBuilders/PropertiesTreeBuilder.cs index ad811b7..32e389d 100644 --- a/src/openapi2excel/Builders/WorksheetPartsBuilders/PropertiesTreeBuilder.cs +++ b/src/openapi2excel/Builders/WorksheetPartsBuilders/PropertiesTreeBuilder.cs @@ -25,13 +25,20 @@ public void AddPropertiesTreeForMediaTypes(RowPointer actualRow, IDictionary= options.MaxDepth) + if (schema == null || level >= options.MaxDepth) { - return; + return; } AddPropertyRow(name, schema, required, level++);