Documentation
¶
Overview ¶
Package contractcopy is rule 6 ("knowledge has one place") for the values a TypeSpec contract declares: it reads the generated openapi/*.openapi.json for its enums and numeric limits and reports a hand-written Go or TypeScript copy of them, and a fixture scope the contract does not declare. Go is read through go/parser, TypeScript through patterns (the frontend has no Go types to ask).
Typed Go const blocks are the domain's own vocabulary and are not read.
A value that only looks like a contract value (an OAuth limit, an internal cap) carries `// contract-copy: <reason>` on its line or the line above; a bare marker is still a finding.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Contract ¶
Contract is what the OpenAPI documents declare: every enum (a sorted set of values) and every numeric limit.
func LoadContract ¶
LoadContract reads every *.openapi.json under dir.