@daddyapi/spec
v0.2.0
Published
The daddyapi SiteSpec schema, loader, and validator — the language-neutral contract.
Maintainers
Readme
@daddyapi/spec
The SiteSpec schema, loader, and validator for daddyapi — the language-neutral contract that describes how to turn a website into an API.
import { loadSiteSpec, parseSiteSpec, safeParseSiteSpec } from '@daddyapi/spec';
const spec = loadSiteSpec('quotes.yaml'); // reads + validates a YAML/JSON fileExports the zod schema (siteSpecSchema) and types (SiteSpec, Resource,
FieldSpec, …), plus a parseDuration helper. No I/O beyond reading a file —
this package is what a second-language runtime must agree with.
MIT
