Re:Smithy: A language for defining services and SDKs
by donavanm on Sunday May 09, 2021 @02:32AM
(#27093743)
Ive used a bit of smithy at work. Yes, composable models, projections, and transforms are super common. Think joining multiple microservices in to a single public interface or splitting out different service/client models based on tags or traits. Most of this is handled by build infrastructure so it takes some mental energy to setup but then it “just works.”
Note: Principal at AWS.
Re:Smithy: A language for defining services and SDKs
by m3h on Saturday May 08, 2021 @08:20PM
(#27092017)
Hey TranquilMarmot. I am working on a TypeScript code Generator for OpenAPI 2 and 3 that you might be interested in. It works on Node.js and web, provides strong typing (types generated against schema in the OpenAPI definition) and runtime type-checking to prevent the runtime data from deviating from TS types. We have been testing it in private for sometime; clients generated using this Code Generator have already been installed ~50K (and counting). I am looking for feedback so I'd be happy if you could try it out. My email is in my profile.
Re:Smithy: A language for defining services and SDKs
by RideAndWave on Saturday May 08, 2021 @08:31AM
(#27086558)
We were bothered by the same thing :) Many plugins for OpenAPI had no codegens which would produce deterministic behavior for compatibility across various languages. Also we wanted to have something that could express complex business domains in definitions.
Ended up building protoforce.io for the very purpose. It does support typescript + nodejs, which we used for the website itself as well.
Re:Smithy: A language for defining services and SDKs
by conradludgate on Saturday May 08, 2021 @03:53AM
(#27084918)
We use multiple files at work, but all of our make rules first bundle the spec into a single file. We also save that bundle in our VCS. CI will fail if the bundle hasn't been recreated since updating the split files
I'll definitely be keeping an eye on this; looking forward to TypeScript code generation! One of our main use cases for OpenAPI is to document our models and then generate TypeScript types from them (that we then use in Node and React apps)