IS there a way to generate Swagger model schemas from interfaces

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
  • typebox

    Json Schema Type Builder with Static Type Resolution for TypeScript

    You could try using @sinclair/typebox, it's API is similar to that of zod, but it spits out a JSON schema that you can then use to validate data at runtime and to populate your Swagger docs.

  • marshal.ts

    A new full-featured and high-performance TypeScript framework

    Yes, you can directly use the interfaces and types as is with Deepkit (https://deepkit.io) and the library deepkit-openapi. You get also full route documentation if you use the deepkit/http router where you can use interfaces and type aliases plus validation thpes for route parameters (query parameters, body, etc). It still in alpha, but approaches soon beta.

  • 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.

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