mirror of
https://github.com/zap-proto/zip.git
synced 2026-10-19 15:38:57 +00:00
The README gave no version to install and no service to run, never mentioned zipdoc, Described, ErrorHandler, the call plane's field-order rule, zipgen, CommandsFromSpec, Authorize or the MCP door's limits, and named APIs that do not exist (app.Add, app.Mount, a zip.Load that takes a prefix first). It now takes one service through REST, MCP, OpenAPI and the CLI with output from real runs, then covers each projection, the error format and the release that introduced it, and the security model. examples/local-service is that service: one SQLite-backed operation, doc comments run through zipdoc, a .mcp.json for Claude Code, and a test that checks every operation against every projection. It is a module of its own so the SQLite driver stays out of zip's graph. CI runs zipdoc -check and its tests. LLM.md is now a map of the code, the test commands, the release steps and the invariants that hold today. Co-authored-by: Hanzo Dev <[email protected]>
23 lines
575 B
Go
23 lines
575 B
Go
// Code generated by zipdoc; DO NOT EDIT.
|
|
|
|
package main
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/zap-proto/zip"
|
|
)
|
|
|
|
func init() {
|
|
zip.Describe("github.com/zap-proto/zip/examples/local-service POST /v1/notes", zip.Doc{
|
|
Description: "Stores a note and returns it with its id.",
|
|
Fields: map[string]string{
|
|
"AddIn.text": "Text is the note body.",
|
|
"Note.id": "ID is the row id SQLite assigned.",
|
|
"Note.text": "Text is the note as written.",
|
|
},
|
|
Example: json.RawMessage(`{"text":"buy milk"}`),
|
|
Response: json.RawMessage(`{"id":1,"text":"buy milk"}`),
|
|
})
|
|
}
|