Skip to content

About openapi-typesafe ​

openapi-typesafe is a fork of openapi-typescript, with its full git history. It keeps the CLI, the Node API, the generated output and the clients of openapi-typescript 7.13, openapi-fetch 0.17 and openapi-react-query 0.5, and replaces the part that ties the generator to the TypeScript compiler API, so it works with TypeScript 7 (see TypeScript 7).

It is not affiliated with the openapi-ts project. The original copyright notices are kept in the license files, as the MIT license requires.

Project goals ​

openapi-typesafe ​

  1. Stay a drop-in successor: the same flags, Node API and output as openapi-typescript 7.13. Every output change is a fix with a test and a changelog entry, checked against a corpus of real-world documents.
  2. Support converting any valid OpenAPI document to TypeScript types, no matter how complicated.
  3. Generated types should be statically analyzable and runtime-free (with minor exceptions like enums).
  4. Generated types should match your original schema as closely as possible, preserving original capitalization, etc.
  5. Need only Node.js to run, and no TypeScript compiler.

openapi-typesafe-fetch ​

  1. Types should be strict and inferred automatically from OpenAPI schemas with the absolute minimum number of generics needed.
  2. Respect the native Fetch API while reducing boilerplate (such as await res.json()).
  3. Be as light and performant as possible.

openapi-typesafe-react-query ​

  1. Types should be strict and inferred automatically from OpenAPI schemas with the absolute minimum number of generics needed.
  2. Respect the original @tanstack/react-query APIs while reducing boilerplate.
  3. Be as light and performant as possible.

Security ​

How the generator treats documents it does not trust, and what is still open, is in the threat model.

Credits ​

openapi-typescript and openapi-fetch were created by Drew Powers, and openapi-react-query by Martin Paucot. This project exists because of their work and the work of the more than 230 people who contributed to openapi-typescript before the fork, some of them below:

  • Przemek Smyrdek
  • Dan Enman
  • Atle Frenvik Sveen
  • Tim de Wolf
  • Tom Barton
  • Sven Nicolai Viig
  • Sorin Davidoi
  • Nathan Schneirov
  • Lucien Bénié
  • Boris
  • Anton Kastritskii
  • Tim Shelburne
  • Michał Miszczyszyn
  • Sam K Hall
  • Matt Jeanes
  • Kristofer Giltvedt Selbekk
  • Elliana May
  • Henrik Hall
  • Gregor Martynus
  • Sam Mesterton-Gibbons
  • Rendall
  • Robert Massaioli
  • Jan Kuča
  • Thomas Valadez
  • Asitha de Silva
  • Misha
  • Alex Batalov
  • Federico Bevione
  • Daisuke Yamamoto
  • Ash Smith
  • Micah Halter
  • chrg1001
  • Dakshraj Sharma
  • Shaosu Liu
  • Vytenis
  • Eric Zorn
  • Max Belsky
  • Peter Bech
  • Rusty Conover
  • Dave Carlson
  • Artem Shuvaev
  • Dominik Dosoudil
  • kgtkr
  • philip trauner
  • Pavel Yermolin
  • Timofei Kukushkin
  • Dmitry Semigradsky
  • Jeremy Liberman
  • Axel Hernández Ferrera
  • Loïc Fürhoff
  • Bartosz Szczeciński
  • Marco Salomone
  • Yacine Hmito
  • Sajad Torkamani
  • Marius van den Beek
  • Steven Grimm
  • Erik Hughes
  • Matthieu Monsch
  • Mitchell Merry
  • François Risoud
  • liangsky
  • Don Denton
  • Yad Smood
  • barak
  • Lukáš Horák
  • Andrea Carraro
  • psychedelicious
  • Tanguy Krotoff
  • Pim Veldhuisen
  • Aleksandr Vishniakov
  • Ahsan Fazal
  • Evgheni Djumac
  • Mohammed Gadi
  • Adam K
  • Christoph Fricke
  • Jorrin
  • Nick Williams
  • hrsh7th
  • phk422
  • Matthias Zronek
  • Łukasz Wiśniewski
  • Jean-Rémi Delteil
  • Tzvi Melamed
  • Niccolo Zapponi
  • Marvin Luchs
  • Neil MacMunn
  • Nadeem Bitar
  • Emory Petermann
  • yoshi2no
  • Tyler Fletcher
  • Nicklos Holik
  • Nikita Gusakov
  • Stéphane Codazzi
  • Michał Fedyna
  • Matthew Lieder
  • Nick Caballero
  • Tang Ziya
  • Yuku Kotani
  • Hadrian de Oliveira
  • zaru
  • Percy Ma
  • Marco Muser
  • Evgenii Perminov
  • Lev Chelyadinov
  • Free 公園
  • jimmy
  • hungify
  • Jared Lunde
  • Armand Abric
  • Trevor Fitzgerald
  • Jonathan Morales Vélez
  • Mike Darwish
  • Mehdi
  • Valentin Agachi
  • moyaojun
  • Dan Michael O. Heggø
  • Fred Silberberg
  • Viljami
  • Felix Kaechele
  • Sebastien Guillemot
  • Morley Tatro
  • Nick Graef
  • Valerij Medviď
  • Bruno Carneiro
  • Mike Stop Continues
  • maurice
  • Ville Penttinen
  • Jiří Staniševský
  • Brad Harker
  • Konstantin Barabanov
  • Hong Seungwoo
  • yicrotkd
  • Makoto Tateno
  • Tomohiro Ishii
  • Blake
  • Elay Gelbart
  • Djordy Koert
  • Jo M
  • Oskar Thornblad
  • Sultan Iman
  • Patryk Tomczyk
  • Marco Ellwanger
  • mochi33i
  • Laurenz Glück
  • Guillaume Duliscouët
  • Ali Kehel
  • Chai Landau
  • Benno
  • Hagen
  • Jungwoo LEE
  • Gianmarco Rengucci
  • Lucas Guedes
  • Viktor Pöntinen
  • Kevin Wang
  • ehrenschwan

Released under the MIT License. Built on openapi-typescript, openapi-fetch and openapi-react-query.