superfaceai / one-sdk-js

1️⃣ One Node.js SDK for all the APIs you want to integrate with
https://superface.ai
MIT License
46 stars 3 forks source link

`normalizeSuperJsonDocument` function and hidden env variables resolution #288

Open freaz opened 2 years ago

freaz commented 2 years ago

It is easy to miss, that without passing environment to the function env variables won't be resolved.

Main issue I see, is not expected behaviour inside SuperJson normalization.

Expected Behaviour

Not sure what would be the best, but can imagine one of the following solutions:

  1. environment will be mandatory parameter
  2. environment variables resolution will happen in separate function

Current Behavior

Silently skips resolution.

Possible Solution

Not obligatory, but suggest a fix/reason for the bug