Repository navigation
docs(mdbase): mark the standalone schemas as type-pack resources - #27
Merged
Merged
Conversation
taskSchemaDocument and bindingSchemaDocument (and their paths) are managed resources of the tasknotes.task type pack. A host that writes them as plain files blocks mdbase setup with collection_setup_namespace_conflict unless the bytes match exactly (tasknotes-app #436). Say so on the type, and test that the pack manages both paths and the contract carries both schemas inline, so a collection is complete without the files.
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.
Why
buildTaskNotesMdbaseResourcesreturnstaskSchemaDocument,bindingSchemaDocumentand theirpaths, next to documents that hosts do write (config, contract, type). The TaskNotes plugin wrote the two schemas as plain files at_schemas/tasknotes/…. Those paths are managed resources of thetasknotes.tasktype pack, so the TaskNotes app's mdbase setup refused withcollection_setup_namespace_conflict(callumalpass/tasknotes-app#436).The model itself does no IO, so this PR changes the API contract rather than any write.
Change
taskSchemaDocument,bindingSchemaDocument,paths.taskSchema,paths.bindingSchemaandbuildTaskNotesMdbaseResources: these are type-pack resources, and a host never writes them as plain files. The contract already carries both schemas inline.record_schema/binding_schemaequal the schemas. A collection is therefore complete without the files.CHANGELOG.md: Unreleased entry.No API or output changes.
npm testpasses (136) andnpm run typecheckis clean.Related