DblK / shottower

An open source, self-hosted implementation of the Shotstack API backend
https://dblk.github.io/shottower
GNU Affero General Public License v3.0
32 stars 5 forks source link

Review json to struct #3

Closed DblK closed 2 years ago

DblK commented 2 years ago

With the generation of the project (thx to openapi-generator) we have to patch the Structure for Asset to have a proper VideoAsset and ImageAsset.

This needs also to be done for Destinations (inside output). Instead of doing it manually for each ressource and having two properties (like Asset and TypedAsset), it would be better uppon unmarshal to have directly the current value of TypedAsset.

The code to modify is in api_edit.go in function PostRender.