TypeSpec: A New Language for API-Centric Development

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

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
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • openapi-code-generator

    A code generation tool for openapi 3 / 3.1 specifications written in typescript, primarily aimed at generating typescript clients and server stubs. Other target languages may be added in future.

  • I added support for typespec as an input specification to my openapi 3 based code generator a couple of days ago.

    They provide an API to convert to openapi documents so it was pretty painless (https://github.com/mnahkies/openapi-code-generator/pull/158)

    My focus is on doing both client sdk and server stub generation, though only typescript so far - will hopefully add other languages eventually, when I'm satisfied with the completeness of the typescript templates.

  • swagger-cli

    Discontinued Swagger 2.0 and OpenAPI 3.0 command-line tool

  • If you are in a situation where you have a backend and you want to expose an API and then you would eventually want a client, you would need format specs as the starting point where server and clients are generated from that one source.

    At the moment, OpenAPI with YAML is the only way to go but you can't easily split the spec into separate files as you would do any program with packages, modules and what not.

    There are third party tools[0] which are archived and the libraries they depend upon are up for adoption.

    In that space, either you can use something like cue language 1] or something like TypeSpec which is purpose built for this so yet, this seems like a great tool although I have not tried it yet myself.

    [0]. https://github.com/APIDevTools/swagger-cli

    [1]. https://cuelang.org/

    EDIT: formating

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

    InfluxDB logo
  • cue

    The home of the CUE language! Validate and define text-based and dynamic configuration

  • If you are in a situation where you have a backend and you want to expose an API and then you would eventually want a client, you would need format specs as the starting point where server and clients are generated from that one source.

    At the moment, OpenAPI with YAML is the only way to go but you can't easily split the spec into separate files as you would do any program with packages, modules and what not.

    There are third party tools[0] which are archived and the libraries they depend upon are up for adoption.

    In that space, either you can use something like cue language 1] or something like TypeSpec which is purpose built for this so yet, this seems like a great tool although I have not tried it yet myself.

    [0]. https://github.com/APIDevTools/swagger-cli

    [1]. https://cuelang.org/

    EDIT: formating

  • oapi-codegen

    Generate Go client and server boilerplate from OpenAPI 3 specifications

  • openapi-typescript

    Generate TypeScript types from OpenAPI 3 specs

  • json-schema-spec

    The JSON Schema specification

  • Yep and that comes from JSON Schema: https://json-schema.org/

    I believe recent versions of OpenAPI are "compatible" with JSON Schema (at least they "wanted to be" last I checked as I was implementing some schema converters).

    Even TypeScript is not enough to represent all of JSON Schema! But it gets close (perhaps if you remove validation rules and stuff like that it's a full match).

    But even something like Java can represent most of it pretty well, specially since sealed interfaces were added. I know because I've done it :).

  • ts-json-schema-generator

    Generate JSON schema from your Typescript sources

  • This looks interesting but I already have TypeScript types for my APIs so I developed https://github.com/vega/ts-json-schema-generator which lets me generate JSON schema from the sources directly. Yes, it does have some oddities because the two languages have slightly different feature sets but it’s been working well for us for a few years. If I didn’t have TypeScript or a smaller API surface I’d be okay with typing again I would look at TypeSpec though. It definitely beats writing JSON schema by hand.

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • Swashbuckle.AspNetCore

    Swagger tools for documenting API's built on ASP.NET Core

  • NSwag

    The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.

  • https://github.com/RicoSuter/NSwag

    There is no need to be facetious solutions like these exist for many platforms and ecosystems out there.

    With best regards.

  • protovalidate

    Protocol Buffer Validation - Go, Java, Python, and C++ Beta Releases!

  • > next to the yaml of openapi anything will look good.

    Challenge accepted!

    https://github.com/bufbuild/protovalidate/blob/main/examples...

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