Open2
OpenAPI から TypeScript のコードを生成する系全般
openapi-typescript
- 言及記事が多い
 - npm trends で top
 - 単純だが、それゆえに分かりやすく、他のライブラリとの組み合わせが楽そう
- その分自前で実装する部分はかなり増える
- 下記の記事(APIスキーマから勝手に型がつく〜)のような型芸が必要
 
 - しかし、client 周りはアプデで事故りたくないので自前で作った方がむしろ管理しやすそう
 
 - その分自前で実装する部分はかなり増える
 
記事
- Auto generate TypeScript d.ts from your API requests/responses
 - Typescript with the OpenAPI specification
 - openapi-typescript-branded-types
 - 【OpenAPI】APIスキーマから勝手に型がつくaxiosを作って幸せになる【openapi-typescript】
 
openapi2aspida
- PRが対応されないために、axios を v0 -> v1 にあげれない時期があった
 - major version up でもないのに、query params の変換方法が変わってバグった
 
openapi-zod-client
- OpenAPI + Zod で型安全な API クライアント出力
 - Generates a zodios (typescript http client with zod validation) from a (json/yaml) OpenAPI spec (or just use the generated schemas/endpoints/etc !)
 
orval
- https://orval.dev/guides/swr : Custom Hook の生成までしてくれる
 - React QueryとOpenAPI定義ファイルからのコード自動生成ツールOrvalを使ったWebアプリケーション開発
 
swagger-typescript-api
- aspida と同じで メソッドチェーンが使える
- しかし、そのメソッドチェーンから path を取得できない。
 
 
autorest
- https://github.com/azure/autorest.typescript#usage
 - https://github.com/Azure/autorest/blob/main/docs/generate/readme.md
 - https://github.com/Azure/autorest.typescript/blob/main/packages/autorest.typescript/docs/client/readme.md
 
openapi-typescript-codegen
まず使わないと思われるもの
sw2dts
型だけ生成できるっぽい
openapi-automatons
- 作ってみた
 - まだ出来立て
 
openapi-generator-cli
- openapi-generatorで感じた問題
 - なんかドキュメントが読みづらい
 
dtsgenerator
- TS の型しか出力できない?
 - Readme パッと見よくわからない
 
codegena
swr-request-generator
- axios を使わない(バンドルサイズが大きくなるから)
 - star 数少ない
 
restful-react
- restful-react has been deprecated: We are focusing on a new open api generator that generates react-query components: https://github.com/fabien0102/openapi-codegen ⚠️
 
openapi-typescript-code-generator
- star 数少ない
 - TypeScript AST
 
NSwag
- 歴史はありそうだけど、パッと見わかりにくい
 
記事
- https://qiita.com/sugurutakahashi12345/items/ee28eddc4f2c0e7fa9a5
 - https://penpen-dev.com/blog/github-star-history/
 - https://www.nebula-graph.io/posts/github-stats-tool
 
記事から pickup した比較サイト
複数のrepoを一気に比較したいというニーズを満たすもの
- https://www.githubcompare.com/
 - https://star-history.com/
 - https://vesoft-inc.github.io/github-statistics/
 
比較
- https://npmtrends.com/autorest-vs-openapi-typescript-vs-openapi-typescript-codegen-vs-openapi2aspida-vs-orval-vs-swagger-typescript-api
 - https://www.githubcompare.com/drwpow/openapi-typescript+aspida/openapi2aspida+acacode/swagger-typescript-api+azure/autorest+ferdikoomen/openapi-typescript-codegen+anymaniax/orval
 - github-statistics