Generated APIs with Runtime type validation

This page summarizes the projects mentioned and recommended in the original post on /r/typescript

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • io-ts

    Runtime type system for IO decoding/encoding

  • I've previously used io-ts as my runtime validator but it doesn't look like the two mix well without a lot of manual code.

  • openapi-generator

    OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)

  • To limit code duplication I'd like to auto-generate the requests from a common schema. I've taken a look at openapi-generator which looks like it would solve the problem. My main concern with this is that there is no runtime validation of responses on the generated API.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • cake-rpc

    fully typed rest library for your express & browser apps

  • I actually ran into a similar challenge a few months back, and came up with a small project: https://github.com/illBeRoy/cake-rpc

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts