Creating a Type-Safe Expand Function for Deep Schema Transformation
How can I take an existing Schema and make deep transformations to it? Essentially I made a expand system similar to stripe's except it is type-safe. Essentially I want to create a function that you can pass a Schema and some paths to expand, if you pass "something.subscriptionId" it will look for the something key inside the json, then it will look for a subscriptionId and replace the id with the respective object, ids that start with
prod_ will be Products for example.