Repository navigation
docs(units): a create may name its unit by unitExternalId alone - #105
Merged
Merged
Conversation
The platform (branch fix/timeseries-create-rejected-unit-external-id-alone, PR #146) now accepts a timeseries create with only unitExternalId and fills unit from the catalogue, and refuses a blank or unknown unitExternalId with a 400 on create and update. That made wrong the claim that unit is required and unitExternalId is never checked against the catalogue. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: jgjesdal <jostein@intellistream.ai>
Signed-off-by: jgjesdal <jostein@intellistream.ai>
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.
Creating a timeseries with only
unitExternalId(nounit) used to be rejected on validation with400 timeseries.unit.not.blank. That was wrong:unitExternalIdnames an entry in the unit catalogue (GET /units), so it identifies the unit fully. The platform fix is IntelliStream-DataHub/datahub-platform#146.New rules on create (
POST /timeseries/createand MCPtimeseries_create):unitExternalIdonly: accepted if the catalogue has it;unitis filled from the entry's symbol (or name).unit+ knownunitExternalId: both kept as sent.unitonly: unchanged, catalogue not consulted.unitExternalId:400onunitExternalId, with or withoutunit. Breaking: an unknown one used to be accepted besideunit.400as before.On update, setting
unitExternalIdto a blank or unknown value is a400before anything is written;setNullstill clears it.Pages:
docs/guides/work-with-units.mdx: replaced the "unit is required, unitExternalId is never checked" paragraph with a small table of the rules, the normalisation note and the update rule.docs/reference/timeseries.md: one paragraph under "Create a series" linking to the guide, and the update rule in "List and update series".docs/mcp-server.mdx:timeseries_createrow says aunitExternalIdmust be in the catalogue.Published content needs a
sync-docsrepublish after merge.🤖 Generated with Claude Code