yes@petr.codes
Home Blog Projects Now Resume
Home Blog Projects Now Resume yes@petr.codes Toggle theme
Ruby gem for API request schemas

Verquest

Version API requests without losing track of schema, validation, and mapping changes.

Verquest is a Ruby gem I built to define versioned request structures, validate incoming params with JSON Schema, and export components for OpenAPI documentation.

View on GitHub RubyGems

Request contracts as Ruby code

Define fields, objects, arrays, enums, constants, references, and version blocks in a small DSL that stays close to the application code using it.

What it handles

The gem focuses on the parts of API evolution that are easy to scatter across controllers, docs, and custom validators.

Versioned request structures

Describe how a request should look for each API version, then resolve the right contract at runtime.

JSON Schema validation

Validate incoming parameters against generated schemas backed by json_schemer.

OpenAPI components

Export JSON Schema components that can be used in API documentation without maintaining a separate schema by hand.

Why I made it

Versioned APIs need more than a params whitelist. The external request shape, internal application shape, validation rules, and documentation all need to evolve together.

Map between external API names and internal parameter structures.
Map validation errors back to the external API structure clients actually sent.
Compose reusable request components through references and collections.
Keep the schema close to Ruby tests and application code while the gem moves toward a stable 1.0 API.

Install Verquest

Verquest supports Ruby 3.2 and newer.

gem "verquest", "~> 0.6"
GitHub repository RubyGems

© 2026 Petr Hlavicka. All rights reserved.

Built with Bridgetown, Web Awesome & Font Awesome