Skip to content

Commit 907e1df

Browse files
committed
Revert "Add a method for processing JSON schemas as references"
This reverts commit 2a4a780.
1 parent e417084 commit 907e1df

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

src/Microsoft.OpenApi/Services/OpenApiWalker.cs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,8 @@ internal void Walk(OpenApiEncoding encoding)
807807
/// </summary>
808808
internal JsonSchema Walk(JsonSchema schema, bool isComponent = false)
809809
{
810-
if (schema == null || ProcessSchemaAsReference(schema, isComponent))
810+
if (schema == null
811+
|| (schema.GetRef() != null && !isComponent))
811812
{
812813
return schema;
813814
}
@@ -1161,17 +1162,6 @@ private bool ProcessAsReference(IOpenApiReferenceable referenceable, bool isComp
11611162
}
11621163
return isReference;
11631164
}
1164-
1165-
private bool ProcessSchemaAsReference(JsonSchema schema, bool isComponent = false)
1166-
{
1167-
var isReference = schema.GetRef() != null && !isComponent;
1168-
if (isReference)
1169-
{
1170-
_visitor.Visit(ref schema);
1171-
}
1172-
1173-
return isReference;
1174-
}
11751165
}
11761166

11771167
/// <summary>

0 commit comments

Comments
 (0)