Repository navigation
Store records as JSON Schema 2020-12; extensions describe their mounts for the OpenAPI export (#861, #881) - #900
Merged
Merged
Conversation
…penAPI contributions (#861, #881) Store collections declare `schema:`, a JSON Schema 2020-12 object schema in core's request body profile, compiled and run by core's body-schema compiler, instead of the private `fields:` vocabulary. The store acts on the standard `default` and `readOnly` (replacing transitionOnly) annotations; key, increments, ownership, transitions, readers, membership, sortable and filterable stay a store-owned layer naming properties. Record failures are 422 invalid_record with core's body-validation issues; filters are judged by the property schema through the same validator. checkValue, FieldSpec and format: http-url are removed (a short link destination is format: uri plus the store's HTTP(S)-only write rule). Extensions gain an optional, pure `describe()` on the registration: with a host file loaded, the OpenAPI export turns a described mount into real paths, checks the contribution (paths at or below the mount, prefixed schemas, local refs, bounded size), keeps only declared methods, assigns operation ids and adds runtime headers and sign-in gate responses. The store describes its collection, readers, transition and short-link mounts from the record schema. The OpenAPI validity and contract-run harness moves to test/openapi-contract.ts and runs against a served store. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve conflicts with #896-#899: keep both store CHANGELOG entries, merge the OpenAPI mounts text in docs/TOOLING.md, and keep #897's new operator-audit test beside the renamed filter test. Re-measured the store package budget. Co-Authored-By: Claude Opus 5.5 <[email protected]>
jimhoyd
enabled auto-merge (squash)
September 29, 2026 08:49
This was referenced Sep 29, 2026
jimhoyd
added a commit
that referenced
this pull request
Sep 29, 2026
…together (#903) Main's CI failed the package audit (954811 packed > 949248) because #900 and #901 each measured the core budget on their own branch. Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
Fixes #861 item 1 (store half; forms is deleted) and #881 item 1.
1. Store records use core's JSON Schema profile
schema:replacesfields:. A collection declares a JSON Schema 2020-12 object schema in core's request-body profile. It is compiled bycompileBodySchema, so the validator, formats, pattern guard and limits are the same as for request bodies.type: objectwith 1–64 properties,additionalProperties: falsewritten out, and exactly one scalartypeper property.defaultis stored on create and PUT.readOnly: truereplacestransitionOnly. A required readOnly property needs a default.key,increments, ownership, transitions, readers, membership,sortableandfilterablestay store config and refer to property names.fields:: both call the same compiler, but a declared schema removes the private vocabulary and is the one OpenAPI publishes. The rationale is in STORE.md.422 invalid_recordwithissuesin core's shape, replacing 400fields.400 invalid_query, but filter values are judged by the property schema.required, so adding a required property doesn't stop a collection that already has data.format: uriproperty. The store still enforces HTTP(S) with no credentials.checkValue,FieldSpec,FieldTypeand the store's private validators. No DB migration is needed.2. Extension OpenAPI contributions
RuntimeExtension.describe?({mount, methods, config}) → {paths, schemas}returns data only. It is called only withurlcode openapi --host-file; without a host file no extension code runs and mounts stay opaque.$refs only to its own schemas or coreUrlcode*components;by: otherstransition and short-link mounts, covering list (limit, cursor, sort, filters), CRUD, increment and transitions. Headers: If-Match, Idempotency-Key, ETag, Allow-Transitions, Location. Record schemas are generated per collection.Migrated
Both private-requests proofs, the store-crud recipe, the
--examplescaffold, the bench, the store-schema artifact, the tests and the docs: STORE, EXTENSIONS#openapi-description, TOOLING,RIM-OPENAPI-001, EXTENSION-REFERENCE, AI-AUTHORING, FRAMEWORK, the skills, the store README/llms/SECURITY/CHANGELOG, and llms.Evidence (macOS, Node 26): one full
npm run verifyafter merging maintest:addons6,test:proof12,test:proof:authjs13,test:ecosystem12;npm run test:packagepasses.Limits
urlcode openapistill lists store mounts as opaque; the store's description needs the host file.$defsor type lists.urlcode.json.🤖 Generated with Claude Code