Clever / wag

sWAGger - Web API Generator
Apache License 2.0
77 stars 6 forks source link

[INFRANG-6029] Fix sync js iterator #480

Closed taylor-sutton closed 7 months ago

taylor-sutton commented 7 months ago

Jira

https://clever.atlassian.net/browse/INFRANG-6029

Overview

When we first split the JS iterator into a forEach and a forEachAsync, we missed a spot in putting the correct template for the sync version. See https://github.com/Clever/wag/pull/303 . You can compare the edited line to the (functional) lines a few lines above it.

Testing

(Internal Clever notes - hard to create an isolated reproduction) I checked out sd2 at commit ef6a858be - one before https://github.com/Clever/sd2/pull/7767 and reproduced FLARE-1630. Then I did the following:

  1. Ran this branch of wag on app-view-service to generate a JS client
  2. Copied that index.js file into sd2's node_modules
  3. Tried the repro again

And the issue no longer reproduced (the desired behavior actually worked).