CI / build (push) Has been cancelled
Three capabilities that share the same request/route metadata:
- **Per-route upload limits** — `@Post('/x', { maxBodyBytes, maxParts })`
overrides the server-wide `limits` for one route (falls back to the
global default), mirroring the existing per-route `duplicates`.
- **Custom error rendering** — `createApp({ onError })` takes over how any
error becomes a response (HTML, RFC 7807, content-negotiated), covering
the whole surface: handler/step throws, 404, 405, 413, 400. Returns a
response or undefined to fall back to the default JSON. Also wires the
previously-unused `HttpError` `body` field so `throw new HttpError(409,
'conflict', { code })` renders a structured payload. Default behavior is
unchanged when no hook is set.
- **OpenAPI 3.1** — `app.openapi(info?)` projects the route graph into a
structural spec (paths, methods, path/query/header params, request-body
presence, systematic error responses); opt-in `GET /__openapi__` via
`devOpenapi`. Body/response schemas stay generic (Standard Schema exposes
no JSON Schema) — the full `@Produce` mode is post-beta.
Docs: new error-handling and OpenAPI guides, plus reference updates.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
56 lines
2.1 KiB
JavaScript
56 lines
2.1 KiB
JavaScript
import { defineConfig } from 'astro/config';
|
|
import starlight from '@astrojs/starlight';
|
|
|
|
// Docs site for @green-tea/core. Content lives in src/content/docs/**.
|
|
export default defineConfig({
|
|
site: 'https://green-tea.dev',
|
|
integrations: [
|
|
starlight({
|
|
title: 'green-tea',
|
|
description: 'A calm, type-safe HTTP framework for Node — your API is an explicit dependency graph.',
|
|
tableOfContents: { minHeadingLevel: 2, maxHeadingLevel: 3 },
|
|
sidebar: [
|
|
{
|
|
label: 'Start here',
|
|
items: [
|
|
{ label: 'Introduction', link: '/' },
|
|
{ label: 'Getting started', slug: 'getting-started' },
|
|
],
|
|
},
|
|
{
|
|
label: 'Concepts',
|
|
items: [
|
|
{ label: 'The dependency graph', slug: 'concepts/the-graph' },
|
|
{ label: 'The typed flow core', slug: 'concepts/flow' },
|
|
],
|
|
},
|
|
{
|
|
label: 'Guides',
|
|
items: [
|
|
{ label: 'Routing', slug: 'guides/routing' },
|
|
{ label: 'Dependency injection', slug: 'guides/dependency-injection' },
|
|
{ label: 'Argument decorators', slug: 'guides/arguments' },
|
|
{ label: 'Validation', slug: 'guides/validation' },
|
|
{ label: 'Error handling', slug: 'guides/errors' },
|
|
{ label: 'Streaming & real-time', slug: 'guides/streaming' },
|
|
{ label: 'File uploads', slug: 'guides/uploads' },
|
|
{ label: 'Transport security', slug: 'guides/security' },
|
|
{ label: 'Plugins & observability', slug: 'guides/plugins' },
|
|
{ label: 'Graph introspection', slug: 'guides/introspection' },
|
|
{ label: 'OpenAPI', slug: 'guides/openapi' },
|
|
{ label: 'Testing', slug: 'guides/testing' },
|
|
{ label: 'Mesh (alpha)', slug: 'guides/mesh', badge: { text: 'alpha', variant: 'caution' } },
|
|
],
|
|
},
|
|
{
|
|
label: 'Reference',
|
|
items: [
|
|
{ label: 'Decorators', slug: 'reference/decorators' },
|
|
{ label: 'createApp options', slug: 'reference/createapp' },
|
|
],
|
|
},
|
|
],
|
|
}),
|
|
],
|
|
});
|