Repository navigation
feat(shared): add the API's contracts and the JSON forms of records - #116
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
PiquelChips
force-pushed
the
feat/server-api-contracts
branch
3 times, most recently
from
November 22, 2026 19:20
a5b25f6 to
746200c
Compare
PiquelChips
force-pushed
the
feat/server-api-contracts
branch
2 times, most recently
from
November 23, 2026 12:30
2d72ae1 to
8cc7073
Compare
PiquelChips
force-pushed
the
feat/server-api-contracts
branch
3 times, most recently
from
November 23, 2026 21:39
5dd88c2 to
39094be
Compare
The HTTP API needs one definition of everything it sends and receives, shared by the server and its clients so the two can't disagree, and an OpenAPI document generated from it. Records, events, landings and policy requirements now serialize with serde and describe themselves with utoipa. Ids, names, paths, principals, verdicts, kind patterns and periods are JSON strings in the form they display as, and parse from: one `as_text!` line each. An acceptance's signature is hex. `origin_shared::api` holds the rest of the contract: repository names, the requests and responses that aren't records or events themselves, such as `Annotation`, which says whether a statement's claim holds, and `ApiError` with its `ErrorCode`, so clients tell failures apart without reading messages.
PiquelChips
force-pushed
the
feat/server-api-contracts
branch
from
November 23, 2026 22:51
39094be to
a5c5917
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The HTTP API needs one definition of everything it sends and receives, shared by the server and its clients so the two can't disagree, and an OpenAPI document generated from it.
JSON forms: records, events, landings and requirements serialize with serde and describe themselves with utoipa. Ids, names, paths, principals, verdicts, kind patterns and periods are JSON strings in the form they display as and parse from, one
as_text!line each. An acceptance's signature is hex.Contracts:
origin_shared::apiholds the rest: repository names, the requests and responses that aren't records or events themselves, andApiErrorwith itsErrorCode, so clients tell failures apart without reading messages.Annotationcarriesholds, whether a statement makes a claim that holds, so plugins count results as the server does.Note
Written by Claude Opus 5.5 in Claude Code (via T3 Code)