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
93 stars 71 forks source link

plugin to scan DataCapture for correct use of Source #463

Closed DinoChiesa closed 1 month ago

DinoChiesa commented 2 months ago

Using DataCapture with URIPath, when the policy is attached to the response flow, with no Source element specified, will always result in null variables. Have a check for that.

Eg

<Capture>
    <DataCollector>dc_path_segment</DataCollector>
    <Collect default="none">
      <Source clearPayload="false">request</Source> <!-- be explicit -->
      <URIPath>
        <Pattern ignoreCase="false">/t1/{$}</Pattern>
        <Pattern ignoreCase="false">/t2/{$}</Pattern>
      </URIPath>
    </Collect>
  </Capture>
DinoChiesa commented 1 month ago

This has now been implemented. in #466