Skip to main content

Syntax overview

OMG files (.omg.md) are Markdown documents with YAML frontmatter and special code blocks that define API endpoints.

File structure

Every OMG endpoint file has three main parts:

  1. YAML Frontmatter — Method, path, and metadata
  2. Markdown Prose — Human-readable descriptions
  3. Code Blocks — Parameters and schemas
---
method: GET
path: /users/{userId}
operationId: get-user
tags: [Users]
---

# Get User

Returns a user by ID.

```omg.path
{
userId: uuid
}
\```

```omg.response
{
id: uuid,
name: string,
email: string
}
\```

Code block types

Block TypePurpose
omg.pathPath parameters
omg.queryQuery parameters
omg.headersHeader parameters
omg.bodyRequest body schema
omg.responseDefault (200) response
omg.response.[code]Specific status code response
omg.returnsConditional responses
omg.exampleExample data
omg.typeReusable type definitions
omg.errorsError response definitions
omg.configConfiguration block

Learn more