Static code analysis for Apigee proxy bundles to encourage API developers to use best practices and avoid anti-patterns.
92
stars
71
forks
source link
EP002 triggers wrongly on "Misplaced 'Condition' element child of DefaultFaultRule" #365
Closed
karsten-wagner closed 1 year ago
I am configuring a DefaultFaultRule as follows:
This seems to work well to execute the whole block only in case the condition is true.
The Apigee documentation also indicates placing a condition for the whole DefaultFaultRule is supported:
See: https://docs.apigee.com/api-platform/fundamentals/fault-handling#simplefaulthandlingexample-2createthefaultrulethatwilltriggerthepolicy
When I execute
apigeelint
in v2.36.0, the linter triggers rule EP002 with the following text in the report:I believe this is wrong behavior and should gracefully ignore the condition statement within a
DefaultFaultRule
code block.