APIs · Intermediate · 25 min
Publish API reference docs people can actually use
By Padding · Updated 18 Nov 2026
Node.js 26.13 · Redocly CLI 2.81 · Prism 5.16
You will turn an OpenAPI file into a static reference page with Redocly CLI, add a hand-written guide with a quickstart, authentication, an error catalogue, rate limits and a changelog, and prove the curl, JavaScript and Python examples work against a local mock server.
On this page
Generated reference docs answer one question well: what does this endpoint accept and return? They do not tell a new developer where to get a token, what to do after a 429, or which call to make first. Those pages decide whether people get their first successful call in five minutes or give up.
In this tutorial you build both halves for a small helpdesk tickets API. Redocly CLI turns the OpenAPI file into a reference page. A short hand-written guide covers the rest: a quickstart, authentication, an error catalogue, rate limits and a changelog. The code examples on the guide are real files, and a script runs each one against Prism, a mock server that answers from the same OpenAPI file. When the examples and the contract drift apart, the script fails before your readers notice.
You end with a docs folder of plain files that any static host can serve.
Step 1 · Create the project and install the tools
Make a folder for the docs project and install the two command-line tools as development dependencies, pinned to exact versions so a new release cannot change your output without you noticing:
mkdir -p ~/tickets-docs-demo
cd ~/tickets-docs-demo
npm init -y > /dev/null
npm install --save-dev @redocly/cli@2.81.0 @stoplight/prism-cli@5.16.0Redocly CLI lints OpenAPI files, bundles them and builds the reference page. Prism reads the same file and starts a fake version of the API that answers with the examples written in it. Prism 5.16 needs Node.js 24.18 or later.
Check it worked
cd ~/tickets-docs-demo
npx redocly --version
npx prism --versionThe two lines read 2.81.0 and 5.16.0.
Step 2 · Add the OpenAPI file and lint it
If you wrote a contract in describe an API with an OpenAPI 3.2 document, you can use that file. This tutorial uses a smaller one, written in OpenAPI 3.1 because Prism reads 3.1 but does not yet list 3.2 as supported. Redocly reads both.
Pay attention to three things in it, because the docs depend on them. Every response has an example, which becomes the sample on the reference page and the answer the mock returns. The shared error responses in components.responses use the problem details format and carry an x-fix line, a custom extension the guide will turn into the error catalogue. And info.version is the number the changelog must match.
cd ~/tickets-docs-demo
cat > openapi.yaml <<'YAML'
openapi: 3.1.1
info:
title: Helpdesk Tickets API
version: 1.1.0
summary: Create and track support tickets.
description: |
Create support tickets and follow them until they are closed.
New here? Start with the [quickstart](index.html#quickstart).
contact:
email: api-support@tickets.test
license:
name: MIT
identifier: MIT
servers:
- url: https://api.tickets.test
description: Production
security:
- bearerAuth: []
tags:
- name: Tickets
description: Support tickets raised by your users.
paths:
/tickets:
get:
operationId: listTickets
summary: List tickets
description: Returns the newest tickets first.
tags: [Tickets]
parameters:
- name: status
in: query
description: Only return tickets with this status.
schema:
type: string
enum: [open, closed]
- name: limit
in: query
description: How many tickets to return.
schema:
type: integer
minimum: 1
maximum: 100
default: 20
responses:
'200':
description: A page of tickets.
content:
application/json:
schema:
$ref: '#/components/schemas/TicketList'
example:
data:
- id: tkt_1042
title: Printer on floor 2 is jammed
status: open
createdAt: '2026-11-18T09:30:00Z'
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/TooManyRequests'
post:
operationId: createTicket
summary: Create a ticket
tags: [Tickets]
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/NewTicket'
example:
title: Printer on floor 2 is jammed
responses:
'201':
description: The ticket was created.
content:
application/json:
schema:
$ref: '#/components/schemas/Ticket'
example:
id: tkt_1042
title: Printer on floor 2 is jammed
status: open
createdAt: '2026-11-18T09:30:00Z'
'401':
$ref: '#/components/responses/Unauthorized'
'422':
$ref: '#/components/responses/ValidationFailed'
'429':
$ref: '#/components/responses/TooManyRequests'
/tickets/{ticketId}:
get:
operationId: getTicket
summary: Get a ticket
tags: [Tickets]
parameters:
- name: ticketId
in: path
required: true
schema:
type: string
pattern: '^tkt_[0-9]+$'
example: tkt_1042
responses:
'200':
description: The ticket.
content:
application/json:
schema:
$ref: '#/components/schemas/Ticket'
example:
id: tkt_1042
title: Printer on floor 2 is jammed
status: open
createdAt: '2026-11-18T09:30:00Z'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: "Send your API token in the header `Authorization: Bearer <token>`."
schemas:
Ticket:
type: object
required: [id, title, status, createdAt]
properties:
id:
type: string
title:
type: string
status:
type: string
enum: [open, closed]
createdAt:
type: string
format: date-time
NewTicket:
type: object
required: [title]
properties:
title:
type: string
minLength: 3
maxLength: 120
TicketList:
type: object
required: [data]
properties:
data:
type: array
items:
$ref: '#/components/schemas/Ticket'
Problem:
type: object
properties:
type:
type: string
title:
type: string
status:
type: integer
detail:
type: string
responses:
Unauthorized:
description: The token is missing or not valid.
x-fix: Send the header Authorization with the value Bearer and your token. Create a new token if it was revoked.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
example:
type: https://api.tickets.test/errors/unauthorized
title: Missing or invalid token
status: 401
NotFound:
description: No ticket has that ID.
x-fix: Check the ID. Tickets you are not allowed to see also return 404.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
example:
type: https://api.tickets.test/errors/not-found
title: Ticket not found
status: 404
ValidationFailed:
description: The request body does not match the schema.
x-fix: Read detail, correct the field it names and send the request again.
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
example:
type: https://api.tickets.test/errors/validation
title: Request body is not valid
status: 422
detail: title must be between 3 and 120 characters.
TooManyRequests:
description: You sent more than 60 requests in a minute.
x-fix: Wait the number of seconds in Retry-After, then retry.
headers:
Retry-After:
description: Seconds to wait before you try again.
schema:
type: integer
example: 30
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
example:
type: https://api.tickets.test/errors/rate-limited
title: Too many requests
status: 429
YAML
npx redocly lint openapi.yamlapi.tickets.test stands in for your own domain: replace it, and the support address, with yours. The .test ending is reserved for examples, which also keeps Redocly's recommended rules quiet: they warn about servers on example.com or localhost, because a reader who copies that address gets nothing back.
Check it worked
The lint ends with a line saying your API description is valid, and reports no warnings. If you used your own file and see warnings, fix them now. Each warning names a rule, and Redocly's rule pages explain the fix. Lint problems turn into confusing docs: a missing operationId gives unstable links, and a missing example gives an empty sample.
Step 3 · Build the reference page
Build the reference as one HTML file in a docs folder, then write a bundled JSON copy of the contract beside it so people can download it into their own tools:
cd ~/tickets-docs-demo
npx redocly build-docs openapi.yaml --output docs/reference.html --title "Helpdesk Tickets API reference" --inlineBundle
npx redocly bundle openapi.yaml --output docs/openapi.jsonbuild-docs uses Redoc, Redocly's open-source renderer. Redocly CLI 2 renders with Redoc 3 and prints a boxed notice saying so; it only matters if you have a theme or template written for Redoc 2. Without --inlineBundle, the page loads Redoc's JavaScript from Redocly's CDN at view time. With it, the script is inside the file, so the folder works on any host, offline and behind a strict content security policy. The cost is size: the inline page is a few megabytes, though most hosts compress it to well under a megabyte. Many readers in Nigeria, Kenya and elsewhere browse on prepaid mobile data, so if your host does not compress HTML, try both builds and compare.
Scalar's API reference is a common alternative renderer with a built-in request console. It reads the same openapi.json, so nothing else in this tutorial changes if you switch.
Check it worked
cd ~/tickets-docs-demo
ls docs
grep -o '<title>[^<]*' docs/reference.htmlls lists openapi.json and reference.html, and grep prints <title>Helpdesk Tickets API reference. You will open the page in a browser in a later step.
Step 4 · Write copy-paste examples in curl, JavaScript and Python
Each example creates one ticket, the quickest useful call. They read the token and the API address from environment variables, so nobody pastes a real token into a file, and the same code runs against production or the mock. Put them in an examples folder:
cd ~/tickets-docs-demo
mkdir -p examples
cat > examples/quickstart.sh <<'SH'
#!/bin/sh
# Create a ticket, then list open tickets. Needs TICKETS_TOKEN.
set -eu
API="${TICKETS_API_URL:-https://api.tickets.test}"
printf 'Authorization: Bearer %s\n' "$TICKETS_TOKEN" |
curl --fail-with-body --silent --show-error \
--header @- \
--header "Content-Type: application/json" \
--data '{"title": "Printer on floor 2 is jammed"}' \
"$API/tickets"
echo
printf 'Authorization: Bearer %s\n' "$TICKETS_TOKEN" |
curl --fail-with-body --silent --show-error \
--header @- \
"$API/tickets?status=open&limit=5"
echo
SH
cat > examples/quickstart.mjs <<'JS'
// Create a ticket with Node.js 18 or later (fetch is built in).
const api = process.env.TICKETS_API_URL ?? 'https://api.tickets.test';
const token = process.env.TICKETS_TOKEN;
if (!token) throw new Error('Set TICKETS_TOKEN first');
const response = await fetch(`${api}/tickets`, {
method: 'POST',
headers: { Authorization: `Bearer ${token}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ title: 'Printer on floor 2 is jammed' }),
});
const body = await response.json();
if (!response.ok) throw new Error(`${response.status} ${body.title}`);
console.log(`Created ${body.id} (${body.status})`);
JS
cat > examples/quickstart.py <<'PY'
"""Create a ticket with Python 3 and only the standard library."""
import json
import os
import urllib.error
import urllib.request
api = os.environ.get("TICKETS_API_URL", "https://api.tickets.test")
token = os.environ["TICKETS_TOKEN"]
request = urllib.request.Request(
f"{api}/tickets",
method="POST",
data=json.dumps({"title": "Printer on floor 2 is jammed"}).encode(),
headers={"Authorization": f"Bearer {token}", "Content-Type": "application/json"},
)
try:
with urllib.request.urlopen(request, timeout=10) as response:
ticket = json.load(response)
except urllib.error.HTTPError as err:
problem = json.load(err)
raise SystemExit(f"{err.code} {problem['title']}")
print(f"Created {ticket['id']} ({ticket['status']})")
PYThree choices make these worth copying. The curl example pipes the header in with --header @-, so the token never appears in the process list where other users of a shared server could read it. --fail-with-body makes curl exit with an error on a 4xx or 5xx but still print the problem details. And the JavaScript and Python versions print the error title instead of a stack trace, which tells the reader what went wrong in one line.
The Python example uses only the standard library, so it runs on any machine with Python 3, without installing a package first.
Check it worked
cd ~/tickets-docs-demo
ls examples
node --check examples/quickstart.mjs
python3 -m py_compile examples/quickstart.py
sh -n examples/quickstart.shls lists the three files and the three syntax checks print nothing. Whether the examples work is the next step's job.
Step 5 · Test every example against a mock server
Start Prism in a second terminal, from the project folder, and leave it running:
cd ~/tickets-docs-demo
npx prism mock openapi.yaml --port 4010Prism prints each route it mocks, then a line saying it is listening on http://127.0.0.1:4010. It answers with the examples from openapi.yaml, and it checks requests against the contract: a missing token gets the 401, a body that breaks the schema gets the 422. A Prefer: code=429 request header asks it for a specific documented response, which lets you test error paths the mock would never reach on its own.
Back in the first terminal, write a script that runs all three examples, then checks that each documented error is really in the contract:
cd ~/tickets-docs-demo
cat > check-examples.sh <<'SH'
#!/usr/bin/env bash
# Runs every published example against the Prism mock on port 4010.
set -euo pipefail
export TICKETS_API_URL=http://127.0.0.1:4010
export TICKETS_TOKEN=mock-token # the mock accepts any bearer token
expect() { # name, expected, actual
if [ "$2" != "$3" ]; then echo "FAIL $1: expected $2, got $3"; exit 1; fi
echo "ok $1"
}
status() { curl --silent --output /dev/null --write-out '%{http_code}' "$@"; }
auth=(--header "Authorization: Bearer $TICKETS_TOKEN")
out=$(sh examples/quickstart.sh)
expect "curl example creates and lists" 2 "$(grep -c '"id": *"tkt_1042"' <<<"$out")"
expect "JavaScript example" "Created tkt_1042 (open)" "$(node examples/quickstart.mjs)"
expect "Python example" "Created tkt_1042 (open)" "$(python3 examples/quickstart.py)"
expect "no token gives 401" 401 "$(status "$TICKETS_API_URL/tickets")"
expect "short title gives 422" 422 "$(status "${auth[@]}" --header 'Content-Type: application/json' \
--data '{"title": "x"}' "$TICKETS_API_URL/tickets")"
expect "unknown ticket is documented as 404" 404 "$(status "${auth[@]}" --header 'Prefer: code=404' \
"$TICKETS_API_URL/tickets/tkt_9999")"
expect "rate limit is documented as 429" 429 "$(status "${auth[@]}" --header 'Prefer: code=429' \
"$TICKETS_API_URL/tickets")"
echo "All examples match the contract."
SH
bash check-examples.shThe first three checks run the files exactly as readers will copy them. The curl example prints two JSON bodies, the new ticket and the list, so its check counts two ticket IDs. The last four prove the errors your guide is about to describe exist in the contract. Run this script in continuous integration on every change to openapi.yaml or examples/, and broken examples stop at review.
Check it worked
The script prints seven ok lines and ends with All examples match the contract. To see a failure, change the title in examples/quickstart.py to "x" and run it again: the Python check fails with 422 Request body is not valid. Change it back before you go on.
Step 6 · Write the guide around the reference
The guide is one HTML page you write by hand, with markers where the build fills in content that must not drift: {{example:...}} for each example file and {{errors}} for the error catalogue. Keep each section short and task-shaped: what to do, then what you will see.
cd ~/tickets-docs-demo
cat > guide.html <<'HTML'
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Helpdesk Tickets API docs</title>
<style>
body { font: 16px/1.6 system-ui, sans-serif; max-width: 46rem; margin: 0 auto; padding: 1rem; color: #1b1d21; }
pre { background: #f1f2f4; padding: 0.75rem; overflow-x: auto; font-size: 0.875rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.875rem; }
th, td { border-bottom: 1px solid #d9dce1; padding: 0.4rem; text-align: left; vertical-align: top; }
td { overflow-wrap: anywhere; }
</style>
</head>
<body>
<h1>Helpdesk Tickets API</h1>
<p>Version {{version}}. <a href="reference.html">API reference</a> · <a href="openapi.json">Download the OpenAPI file</a></p>
<h2 id="quickstart">Quickstart: your first ticket in five minutes</h2>
<ol>
<li>Create an API token in your account settings, under API tokens. Copy it once; it is not shown again.</li>
<li>Put it in your shell without saving it to history. Paste it at the prompt and press Enter:
<pre><code>read -rs TICKETS_TOKEN && export TICKETS_TOKEN</code></pre></li>
<li>Save the curl example below as <code>quickstart.sh</code> and run <code>sh quickstart.sh</code>.</li>
</ol>
<p>You see the new ticket as JSON, with an <code>id</code> such as <code>tkt_1042</code> and <code>"status": "open"</code>, then a list of open tickets. If you see <code>401</code>, check the token.</p>
<h2 id="authentication">Authentication</h2>
<p>Every request needs an API token in the <code>Authorization</code> header: <code>Bearer</code>, a space, then the token. Tokens act as you, so keep them on servers, in environment variables or a secret manager. Never put one in a mobile app, a web page or a Git repository. Revoke a token in your account settings the moment it leaks; requests with it fail with <code>401</code> straight away.</p>
<h2 id="examples">Examples</h2>
<h3>curl</h3>
<pre><code id="example-curl">{{example:quickstart.sh}}</code></pre>
<h3>JavaScript (Node.js 18 or later)</h3>
<pre><code id="example-js">{{example:quickstart.mjs}}</code></pre>
<h3>Python 3</h3>
<pre><code id="example-python">{{example:quickstart.py}}</code></pre>
<p>Set <code>TICKETS_API_URL</code> to point the examples at another environment.</p>
<h2 id="errors">Errors</h2>
<p>Errors use problem details (<code>application/problem+json</code>). Check <code>status</code>, and use <code>type</code> to branch in code: it never changes, while <code>title</code> may be reworded.</p>
<table>
<thead><tr><th>Status</th><th>Type</th><th>Meaning</th><th>What to do</th></tr></thead>
<tbody>
{{errors}}
</tbody>
</table>
<h2 id="rate-limits">Rate limits</h2>
<p>Each token may send 60 requests a minute. Over that, you get <code>429</code> with a <code>Retry-After</code> header giving the seconds to wait. Wait that long before you retry, and do not retry in a tight loop: every retry counts against the limit.</p>
<h2 id="changelog">Changelog</h2>
<h3 id="v1.1.0">1.1.0, 18 November 2026</h3>
<ul><li>Added the <code>status</code> filter to List tickets. Existing calls are unchanged.</li></ul>
<h3 id="v1.0.0">1.0.0, 3 November 2026</h3>
<ul><li>First release: create, list and get tickets.</li></ul>
</body>
</html>
HTMLNow the build script. It pastes each example file into the page, escaped for HTML, so the page shows exactly the code the check script runs. It builds the error rows from the shared responses in the bundled contract, so a new error in openapi.yaml appears in the catalogue without anyone remembering to add it. And it refuses to build if the newest changelog entry does not match info.version, or if a marker is left unfilled:
cd ~/tickets-docs-demo
cat > build.mjs <<'JS'
import { readFile, writeFile } from 'node:fs/promises';
const escape = (text) =>
String(text).replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>');
const spec = JSON.parse(await readFile('docs/openapi.json', 'utf8'));
let page = await readFile('guide.html', 'utf8');
// 1. The changelog must start with the version the contract declares.
const newest = page.match(/<h3 id="v([\d.]+)"/)?.[1];
if (newest !== spec.info.version) {
throw new Error(`Changelog starts at ${newest}, but openapi.yaml says ${spec.info.version}`);
}
page = page.replaceAll('{{version}}', escape(spec.info.version));
// 2. Paste in the example files that check-examples.sh runs.
for (const name of ['quickstart.sh', 'quickstart.mjs', 'quickstart.py']) {
const code = await readFile(`examples/${name}`, 'utf8');
page = page.replace(`{{example:${name}}}`, escape(code.trimEnd()));
}
// 3. One error row per shared response in the contract, sorted by status.
const rows = Object.values(spec.components.responses)
.map((response) => ({ ...response.content['application/problem+json'].example, response }))
.sort((a, b) => a.status - b.status)
.map(({ status, type, response }) =>
` <tr><td>${status}</td><td><code>${escape(type)}</code></td>` +
`<td>${escape(response.description)}</td><td>${escape(response['x-fix'])}</td></tr>`);
page = page.replace('{{errors}}', rows.join('\n'));
const leftover = page.match(/\{\{[^}]*\}\}/);
if (leftover) throw new Error(`Unfilled marker ${leftover[0]} in guide.html`);
await writeFile('docs/index.html', page);
console.log(`Wrote docs/index.html for version ${spec.info.version} with ${rows.length} errors`);
JS
npm pkg set 'scripts.docs=redocly lint openapi.yaml && redocly build-docs openapi.yaml --output docs/reference.html --title "Helpdesk Tickets API reference" --inlineBundle && redocly bundle openapi.yaml --output docs/openapi.json && node build.mjs'
npm run docsnpm run docs is now the one command that rebuilds everything, in an order where each stage can stop the next: lint, reference page, bundle, guide.
Check it worked
The last line of the output is Wrote docs/index.html for version 1.1.0 with 4 errors. To see the changelog guard work, change version: 1.1.0 in openapi.yaml to 1.2.0 and run npm run docs again. It fails with Changelog starts at 1.1.0, but openapi.yaml says 1.2.0. Change it back, or add a 1.2.0 entry at the top of the changelog.
Step 7 · Preview the docs folder and check it in a browser
Serve the folder the way a static host would. In the second terminal, stop Prism with Ctrl+C, then run:
cd ~/tickets-docs-demo
python3 -m http.server 8080 --bind 127.0.0.1 --directory docsOpen http://127.0.0.1:8080 and follow the links. Then automate the same visit with Playwright, so a broken build is caught without anyone opening a browser. Install it and its Chromium build:
cd ~/tickets-docs-demo
npm install --save-dev playwright@1.65.1
npx playwright install --with-deps chromiumThe check opens the guide at phone width, confirms the examples and all four error rows are on it and that nothing overflows sideways, then follows the reference link and waits for Redoc to render the API overview with its operations:
cd ~/tickets-docs-demo
cat > check-site.mjs <<'JS'
import { chromium } from 'playwright';
import assert from 'node:assert/strict';
const site = 'http://127.0.0.1:8080';
const browser = await chromium.launch();
const page = await browser.newPage({ viewport: { width: 360, height: 740 } });
await page.goto(`${site}/`);
assert.equal(await page.title(), 'Helpdesk Tickets API docs');
assert.match(await page.locator('#example-curl').textContent(), /--header @-/);
assert.match(await page.locator('#example-python').textContent(), /urllib\.request/);
assert.equal(await page.locator('#errors + p + table tbody tr').count(), 4);
const overflow = await page.evaluate(() => document.documentElement.scrollWidth > window.innerWidth);
assert.equal(overflow, false, 'the guide scrolls sideways at 360px');
await page.setViewportSize({ width: 1280, height: 900 });
await page.getByRole('link', { name: 'API reference' }).click();
await page.waitForFunction(() =>
['Helpdesk Tickets API (1.1.0)', 'POST', '/tickets/{ticketId}'].every((t) => document.body.innerText.includes(t)));
assert.equal(await page.title(), 'Helpdesk Tickets API reference');
const contract = await page.request.get(`${site}/openapi.json`);
assert.equal(contract.status(), 200);
assert.equal((await contract.json()).info.version, '1.1.0');
await browser.close();
console.log('Docs site checks passed');
JS
node check-site.mjsThe code blocks scroll inside themselves on a narrow screen, which is why the page as a whole must not. The error table cannot scroll on its own, so overflow-wrap: anywhere on its cells lets the long type URLs break across lines instead of pushing the page wider. A 360-pixel viewport matches many low-cost Android phones, which is where a good share of developers in Africa will first read your docs.
Check it worked
The script prints Docs site checks passed. In your own browser, the reference page opens on an overview of the API at version 1.1.0, with the three operations listed under Tickets by method and path. Select one to see its request and response samples from openapi.yaml. The guide's error table lists 401, 404, 422 and 429.
Step 8 · Publish the folder and clean up
The docs folder is the whole site: index.html, reference.html and openapi.json. Upload it to any static host, such as an Nginx server, an object storage bucket with website hosting, or GitHub Pages, and point a subdomain such as docs. at it. Run npm run docs and bash check-examples.sh in your deployment pipeline before the upload, so a page with failing examples never ships.
cd ~/tickets-docs-demo
ls docsls shows index.html, openapi.json and reference.html.
When you have finished with the demo, stop the preview server with Ctrl+C in the second terminal, then remove the project:
cd ~
rm -rf ~/tickets-docs-demoPlaywright keeps its browser download in a shared cache (~/.cache/ms-playwright on Linux, ~/Library/Caches/ms-playwright on macOS). Delete that folder too if no other project uses Playwright.
Check it worked
ls ~/tickets-docs-demo reports that there is no such file or directory.
Next steps
- Make your errors match what the guide promises: return API errors as problem details.
- Give the changelog something to say without breaking anyone: version an API without breaking existing clients.
- Go deeper on the contract itself: describe an API with an OpenAPI 3.2 document.
- See the docs from the other side: read the documentation to answer your own questions.
Part of these paths
Related tutorials
- Describe an API with an OpenAPI 3.2 documentYou will write an OpenAPI 3.2 contract for a ticketing API by hand across several files, lint it clean with Redocly CLI 2, bundle it into one file and generate TypeScript types that a client uses against a mock server.
- Read the documentation to answer your own questionsYou will answer five real programming questions from primary sources (Python's help and pydoc, man and --help, the Python docs, MDN and release notes) and end with a file of five answers, each with the page it came from.
- Return consistent API errors with Problem Details (RFC 9457)You will give every error from an Express 5 API the same application/problem+json shape, with a stable type URI per error kind, field errors, no stack traces, a client that handles them all in one place, an OpenAPI description and the same contract in FastAPI.
Need this done for you?
Padding does this work for growing companies, from the first diagnosis to a system that keeps working.
Get new tutorials