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
So I have setup a tooling that looks at Schema defined in my elm file, and generates python and go code to auto validate input/output/error cases. Now when I modify schema, my unit tests in python fail (they don't even check the schema, just assert that schema is getting verified).
But now my elm code has become "test at runtime", I change some APIs, then I have to manually go through the appropriate manual steps in browser that triggers API, and then I detect that my decode in elm frontend code is no longer compatible with my API-schema.
If there was a way to auto generate elm decoder out of schema, the runtime problem will become compile time problem for me.
Has anybody given any thought to how hard/easy would it be? Or is there some library / tool already available that does this?
The text was updated successfully, but these errors were encountered:
Curious if you got anywhere with this. Seems like it might be possible with an additional schema property for the constructor name. To generate the decoder code, not the code for types themselves, right?
No time to clean it up, but I think the gist should be mostly self contained. Do let me know if you want me to explain anything, or share any more utilities.
So I have setup a tooling that looks at Schema defined in my elm file, and generates python and go code to auto validate input/output/error cases. Now when I modify schema, my unit tests in python fail (they don't even check the schema, just assert that schema is getting verified).
But now my elm code has become "test at runtime", I change some APIs, then I have to manually go through the appropriate manual steps in browser that triggers API, and then I detect that my decode in elm frontend code is no longer compatible with my API-schema.
If there was a way to auto generate elm decoder out of schema, the runtime problem will become compile time problem for me.
Has anybody given any thought to how hard/easy would it be? Or is there some library / tool already available that does this?
The text was updated successfully, but these errors were encountered: