orval
is able to generate client with appropriate type-signatures (TypeScript) from any valid OpenAPI v3 or Swagger v2 specification, either in yaml
or json
formats.
I often use a swagger as contract between the frontend and backend team. And before Orval, I used the swagger editor or swagger codegen but that wasn't enough for my need. That's why I started Orval.
Main goals:
The default generated client use axios and can be used by fetch API or your favourite Javascript framework like Angular, React or Vue. It's just a function who takes an instance of axios or function of fetch API in argument and return an object where each key is a function who setup a call HTTP. Learn more
Orval can also generate the following client: