Repository navigation
feat: add hive schema CLI command - #283
Merged
Merged
Conversation
Maps to the new GET /v1/hive/{hive_name}/schema endpoint that returns
the JSON Schema (draft 2020-12) describing a hive's record type. Lets
CLI users discover record structure programmatically and validate
records before calling 'hive set' with any standard JSON Schema
validator.
Hives without a typed record format (dr-*, fp, extension_config)
return NO_SCHEMA_AVAILABLE from the underlying RPC.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
JWT service now returns 'user not found: ' when an API key tries to obtain a user-scoped JWT (oid='-'). Broaden the assertion in test_v2_org_list_accessible_orgs to also accept this phrasing so the test stays green across backend versions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
limacharlie hive schema --hive-name <name>, mapping to the new public API endpointGET /v1/hive/{hive_name}/schemahive setusing any standard validator (jsonschema,ajv, etc.).NO_SCHEMA_AVAILABLEfrom the upstream RPC; unknown hives surfaceUNKNOWN_HIVE.Test plan
tests/unit/test_sdk_hive.py::TestHiveGetSchema(URL shape, hive-name escaping)tests/unit/test_cli_lazy_loading_regression.py—hivesubcommand set now includesschemahive schema --hive-name secret→ returnsSecretRecordschemahive schema --hive-name ai_agent→ returns multi-$defsschema with cross-refshive schema --hive-name lookup→ richerLookupRecord+OptimizedLookupdefshive schema --hive-name dr-general→NO_SCHEMA_AVAILABLE(expected)hive schema --hive-name not_a_real_hive→UNKNOWN_HIVE(expected)--output yamlround-trips correctly through the standard formatterjsonschema.Draft202012Validator.check_schema; all pass and correctly enforcerequired, types, andadditionalProperties: falseon sample records🤖 Generated with Claude Code