apigee / apigeelint

Static code analysis for Apigee proxy bundles to encourage API developers to use best practices and avoid anti-patterns.
Apache License 2.0
92 stars 71 forks source link

PO028 - The policy type (CORS) is not available in the profile apigee - Apigee X #394

Closed kiranjyoth closed 10 months ago

kiranjyoth commented 11 months ago

Hello team, Encountering error with CORS policy, triggering RuleID PO028

Details apigeelint version 2.44.0

Related to - #335 #336

Thanks!

ssvaidyanathan commented 11 months ago

@kiranjyoth - CORS policy is available and applicable only for --profile apigeex

Or are you saying its not working with apigeex?

https://github.com/apigee/apigeelint/blob/89487ce7488e632a31837f0351302762e44ba6a8/lib/package/plugins/policyMetaData.json#L10

kiranjyoth commented 11 months ago

@ssvaidyanathan yes, the proxy is being deployed to Apigee X, but the policy is not being identified.

ssvaidyanathan commented 11 months ago

@kiranjyoth - you need to run the apigeelint command with --profile apigeex

The default is "apigee" so it throws that

kiranjyoth commented 11 months ago

Thanks @ssvaidyanathan I will update the script and test. Will close this issue and mark as resolved once validated. Thank you for you quick response!

ssvaidyanathan commented 10 months ago

@kiranjyoth - can this be closed?

kiranjyoth commented 10 months ago

Yes @ssvaidyanathan, closing this issue. using profile switch worked perfectly!