Feel free to email me at mish@stepci.com if you want to hear more!
Feel free to email me at mish@stepci.com if you want to hear more!
Generator: https://github.com/oxidecomputer/oxide.ts/blob/64401fa2/gene...
Generated output: https://github.com/oxidecomputer/console/blob/8e74accf/libs/...
Manually implemented endpoint behavior: https://github.com/oxidecomputer/console/blob/8e74accf/libs/...
[Edit, after reading a bit of the code]
Am I correct in understanding that the generated code maps API calls to a typed interface, and then the hand-built implementation simply implements that interface?
So rather than complex weaving where you want hand-coded function bodies but generated signatures, you have generated signatures, where each function body calls a method on a generated interface.
big function call https://github.com/oxidecomputer/console/blob/bd65b9da7019ad...
automatic body parsing and argument passing: https://github.com/oxidecomputer/console/blob/bd65b9da7019ad...
When an endpoint gets added to the spec, we can rerun the generator and get type errors in the `makeHandlers` telling us endpdoints are missing.