Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion utils/manifests/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const (
JsonSchemaPropsRef = "JSONSchemaProps"
// DefaultMaxRefDepth is the maximum depth for resolving $ref references
// This prevents exponential blowup when processing large OpenAPI specs like Kubernetes
DefaultMaxRefDepth = 10
DefaultMaxRefDepth = 50

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The DefaultMaxRefDepth has been increased to 50. While this addresses the need for a deeper reference resolution, the specific value of 50 lacks explicit justification within the code. Consider adding a comment on this line or in the surrounding documentation to explain the rationale behind this specific value, perhaps referencing the issue it resolves (e.g., fixes #XYZ) or the type of OpenAPI specs that require this depth. This would improve future maintainability and understanding of this critical constant.

Suggested change
DefaultMaxRefDepth = 50
DefaultMaxRefDepth = 50 // Increased to handle larger OpenAPI specs (fixes #<issue_number>)

)

var templateExpression *regexp.Regexp
Expand Down
Loading