// the find
wcandillon/swagger-js-codegen
A Swagger Codegen for typescript, nodejs & angularjs
A Node library and CLI that generates API client classes from a Swagger spec for Node, AngularJS, React, and TypeScript, using mustache templates that you can replace with your own. It suits teams that want a small generator they can read and fork, not the Java-based swagger-codegen toolchain.
- getCustomCode takes your own class and method templates, so you can change the shape of the output without forking the generator. The README lists the template variables, which makes custom templates practical to write.
- The TypeScript output is built on superagent and runs in Node and the browser through browserify or webpack, so the generated client has no runtime dependency on the generator.
- Output can be passed through jshint and js-beautify, so the generated code comes out readable rather than as raw string concatenation.
- Unmaintained. The last push was in December 2022, and the first section of the README asks for a new maintainer. Bug reports and pull requests are unlikely to get a response.
- The README points readers to swagger-codegen as the better option. For most projects today that is probably right, which means this package is effectively frozen at its current feature set.
- The code reads Swagger 2.0 fields such as host, basePath and securityDefinitions, so an OpenAPI 3 spec needs converting first. The options table covers getAngularCode, getNodeCode and getCustomCode but not getTypescriptCode or getReactCode, so those settings have to be read from the source.