RubyLLM::Schema Is Now Schematist: A JSON Schema DSL for Ruby with Full Draft 2020-12 Coverage 0 ▲ Carmine Paolino 1 hour ago · 6 min read1120 words · Tech · hide · 0 comments Schematist is a general purpose JSON Schema DSL that emits Draft 2020-12 schemas. Describe an API payload, a config file, a contract between two services, or the structured output you want back from a model. Trapping that inside another gem’s namespace was a disservice to anyone looking for a great JSON Schema DSL, so it got its own name. gem 'schematist' It Emits Actual JSON Schema This is the breaking change. to_json_schema used to return this: { name: "PersonSchema", description: nil, schema: { type: "object", ... }, strict: true } That’s not a JSON Schema. It’s OpenAI’s response_format envelope, with the actual schema buried one level down under a symbol key. Every consumer that wasn’t OpenAI had to dig it out, and anyone who wanted to hand the result to a validator had to know which part was real. Now you get the document: class Invoice < Schematist::Schema title "Invoice" description "A billing document" string :id, pattern: "^inv_", title: "Invoice ID" number :total,… No comments yet. Log in to reply on the Fediverse. Comments will appear here.