Using Typescript AST + JSII for Open-API-Gateway generation #241
JeremyJonas
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be great to replace the open-api-gateway mustache templates used to generate the language interfaces with Typescript AST and JSII, which would reduce development of interface templates to just Typescript while automatically generating the other languages (python, java, etc.). This would be much more maintainable and faster to evolve - mustache templates are difficult to maintain/review/test/etc.
This likely has to wait until JSII support Typescript 4.x to provide more flexibility in the interfaces, as we don't want to break the API design. And maybe even need WebAssembly to prevent bundling and latency of proxying calls to javascript lib from other languages (definitely not acceptable for an api gateway).
We would still need to maintain a thin request implementation for each language, to prevent latency proxy to node, which could be passed in as typed interface to the config.
Rough Flow Design
Still very rough idea and not sure if even possible with the toolchain - but could also utilize other tools in the chain to have the same outcome.
Beta Was this translation helpful? Give feedback.
All reactions