Define once in Ruby. Generate everywhere in TypeScript.
For Rails apps using Alba, AMS, Oj, or Panko serializers.
class PostResource < ApplicationResource
include Typelizer::DSL
attributes :id, :title, :body
has_one :author
has_many :comments
endexport interface Post {
id: number;
title: string;
body: string;
author: Author;
comments: Array<Comment>;
}Supports Alba, ActiveModel::Serializer, Oj::Serializer, and Panko out of the box.
Import your Rails routes as typed functions. Params are checked, paths are built -- no strings to get wrong.
Need snake_case for one app and camelCase for another? Define multiple writers, generate both at once.
Change a serializer, types regenerate. Edit routes.rb, route helpers update. Zero manual steps in development.
Turn the same serializer definitions into OpenAPI 3.0 or 3.1 component schemas for your API docs.
Configure globally, per-writer, or per-serializer. Sensible defaults, full control when you need it.