Unlocking API Interoperability: Converting OpenAPI to TypeScript JSON Schema

This page summarizes the projects mentioned and recommended in the original post on dev.to

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.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • TypeScript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • Since the OpenAPI Specification is a "machine-readable interface definition language for describing, [...] web services", and TypeScript is practically the only available type solution for Node.js, I confidently googled:

  • openapi-ts-json-schema

    OpenAPI ➡️ TypeScript JSON Schema generator.

  • After an initial attempt to manually replace the $refs all around my JSON schemas, I ended up putting together a few lines to automate the process which I eventually abstracted into a JS NPM package: openapi-ts-json-schema.

  • 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
  • json-schema-ref-parser

    Parse, Resolve, and Dereference JSON Schema $ref pointers in Node and browsers

  • Resolve external/remote $refs and dereference them with @apidevtools/json-schema-ref-parser (resolving $ref's)

  • openapi-schema-to-json-schema

    Due to the OpenAPI v3.0 and JSON Schema discrepancy, you can use this JS library to convert OpenAPI Schema objects to proper JSON Schema. (by openapi-contrib)

  • Convert to JSON schema with @openapi-contrib/openapi-schema-to-json-schema and openapi-jsonschema-parameters

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

  • JSR Is Not Another Package Manager

    2 projects | news.ycombinator.com | 25 Apr 2024
  • Understanding the Difference Between Type and Interface in TypeScript

    1 project | dev.to | 2 Apr 2024
  • Proposal: Types as Configuration

    1 project | news.ycombinator.com | 1 Apr 2024
  • A Deep Dive into the satisfies operator in Typescript

    1 project | dev.to | 12 Mar 2024
  • Building a full stack app with Remix, Prisma, and Neon

    2 projects | dev.to | 12 Mar 2024