You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @emilsedgh,
There is actually a big bug in the generator. The Clip when generated is trying to load a file model/OneOfVideoAssetImageAssetTitleAssetHtmlAssetAudioAssetLumaAsset for the assets, but this file is never actually created. It obviously does not know how to handle Swagger/OAS3 oneOf types.
To work around that we just created the Assets.js file and updated the references to it. We have to manually update this part of the codebase every time anyway along with one or two other things.
If you wanted to submit a pull request that would be awesome. We'll work it in with the generated code each time which we do anyway right now until we can fully automate it.
I'll try to come up with a patch soon. Is there any similar bug that'd prevent constructFromObject working reliably? I'm trying to figure out if I can rely on it or I should switch to imperative function calls.
Activity
jeffski commentedon Nov 26, 2021
Hi @emilsedgh,
There is actually a big bug in the generator. The Clip when generated is trying to load a file
model/OneOfVideoAssetImageAssetTitleAssetHtmlAssetAudioAssetLumaAssetfor the assets, but this file is never actually created. It obviously does not know how to handle Swagger/OAS3oneOftypes.To work around that we just created the Assets.js file and updated the references to it. We have to manually update this part of the codebase every time anyway along with one or two other things.
If you wanted to submit a pull request that would be awesome. We'll work it in with the generated code each time which we do anyway right now until we can fully automate it.
It would be great if you could submit a pull requ
emilsedgh commentedon Nov 26, 2021
I'll try to come up with a patch soon. Is there any similar bug that'd prevent
constructFromObjectworking reliably? I'm trying to figure out if I can rely on it or I should switch to imperative function calls.jeffski commentedon Nov 26, 2021
I never used constructFromObject or tried to work it out to be honest, which is why it never got any attention or checks. Most users just use the classes similar to how we use them in our demo project, like this: https://github.com/shotstack/node-demos/blob/main/examples/images.js.
The other way is to skip the SDK and just JSON.stringify the whole edit object and use fetch or axios to post to the API.
If you don't get a chance to look at it I will see what I can do in the next SDK update.