[WIP] Merge JavaScript Server Generator to Main
This work-in-progress PR tracks merging the JavaScript server code generator to the TypeSpec repository.
The JavaScript server code generator creates HTTP bindings for TypeSpec HTTP services and exposes them for binding either to the Node.js http server directly, or to an Express.js app as middleware.
This is a large PR with some issues to be worked out before it can be merged:
- [ ] Confirm naming. I've named this according to the specification
http-server-javascript, but this emitter is just capable of emitting an HTTP server. It can also emit TypeScript models alone, and HTTP is enabled as an optional feature of the emitter. - [ ] This emitter has many cases of broken functionality and TODO comments that should be either fixed or made issues before merging, and we should document the instability of this experimental emitter until it's ready.
- [ ] There are currently no tests, so I'll need to set up a testing harness.
- [ ] There are a few utilities that are useful enough to consider moving into the core library, such as the ReCase system for changing strings between naming cases, the HTTP route tree, and maybe the OutputDecisionTree if it were more full-featured.
Closes #3215
All changed packages have been documented.
- :white_check_mark:
@typespec/http-server-javascript
Show changes
@typespec/http-server-javascript - internal ✏️
Added the experimental HTTP server generator for JavaScript.
You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/3231/
Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/3231/