Command Palette

Search for a command to run...

The simple solution to the stupid OpenAPI problem

Published on:
Reading time:3 min read

The Simple Solution to the Stupid OpenAPI Problem

OpenAPI is supposed to make APIs clear, structured, and predictable.

Instead, for many teams, it becomes a second job.

You write your backend code.
Then you write OpenAPI.
Then you update OpenAPI.
Then you forget to update OpenAPI.
Then your documentation lies.

That’s the stupid OpenAPI problem.

It’s not that OpenAPI itself is bad. It’s that keeping it in sync with real code is painful, repetitive, and easy to break.

There is a simpler way.

That way is Yelix.


How to Start (Simple)

If you want the shortest path from zero to running API, this is it.

1) Install Deno

Yelix runs on Deno. Install it first:

deno --version

If that command is missing, install Deno from https://docs.deno.com/runtime/getting_started/installation/ .

2) Create a tiny app
import { YelixHono } from '@yelix/hono';

const app = new YelixHono();

app.get('/', (c) => {
	return c.text('Hello, Yelix!');
});

Deno.serve(app.fetch);
3) Run it
deno run --allow-net main.ts

Open http://localhost:8000 and you should see the response.

4) Optional: add instant docs
app.__openapi.setTitle('My API');
app.__openapi.setDescription('API Documentation');

app.exposeScalarOpenAPI({
	title: 'My API Documentation',
	openapiJsonPath: '/openapi.json',
	docsPath: '/docs',
});

Now visit:

The Real Problem

Most backend projects treat OpenAPI as an external document.

You define routes in one place.
You define validation somewhere else.
You define response schemas in another file.
You manually describe everything in YAML or JSON.

Now you have:

  • Code
  • Validation logic
  • Documentation
  • Types
  • Response schemas

All describing the same thing.

And the moment one of them changes, the others become outdated.

The result:

  • Docs drift away from reality
  • Frontend teams lose trust
  • SDK generation becomes unreliable
  • Maintaining the spec feels like overhead

OpenAPI becomes a chore instead of an asset.


What Yelix Does Differently

Yelix is a backend-first framework built on top of Hono and Deno.

It treats OpenAPI not as a separate document, but as a byproduct of your actual backend logic.

Instead of writing documentation manually, you define:

  • Route
  • Validation
  • Response schema
  • Metadata

In one place.

From that single definition, Yelix generates:

  • Type-safe handlers
  • OpenAPI 3.1 spec
  • Interactive documentation
  • Schema consistency

No duplication.
No YAML babysitting.
No spec drifting.


One Definition. Everything.

Here is the core idea.

You define your route with validation and response schema. That becomes the source of truth.

From that source, Yelix:

  • Validates requests
  • Infers TypeScript types
  • Generates OpenAPI documentation
  • Powers documentation UI
  • Keeps everything consistent

You stop maintaining documentation.

You maintain your API.


Built for Real Backend Work

Yelix is not just an OpenAPI generator.

It includes:

  • Zod-based request validation
  • Query and path parameter validation
  • JSON body validation
  • OpenAPI 3.1 support
  • Scalar UI integration
  • Middleware support
  • Dashboard support
  • Deno-native runtime

It fits into modern backend workflows without forcing complex abstractions.


Why This Matters

When OpenAPI becomes automatic:

  • Documentation is always correct
  • Frontend teams can rely on it
  • SDKs can be generated safely
  • Refactoring is less risky
  • API design becomes intentional

Instead of fighting documentation drift, you focus on building the product.

That is the real benefit.


The Philosophy

The problem was never OpenAPI itself.

The problem was duplication.

If your API definition, validation rules, types, and documentation live in different places, inconsistency is inevitable.

Yelix removes duplication.

One definition.
One source of truth.
Everything generated from it.

That is the simple solution to the stupid OpenAPI problem.


If you are building APIs in Deno and want your documentation to finally stop lying to you, Yelix is worth a serious look.

Share:

M
Written by