feat(api): add cohorts.validate HTTP proxy, props CLI commands, and OpenAPI spec#271
Merged
Conversation
…penAPI spec - Add GET /api/v1/cohorts/validate endpoint to HTTP proxy (was NATS-only) - Add CohortValidateResponse schema to OpenAPI spec - Add 'grlx props' CLI command with get, set, delete, search subcommands - Add test for cohorts validate HTTP route The NATS handlers for cohorts and props were already complete from prior work. This PR polishes the surface: exposes the validate endpoint via HTTP for the web UI, adds a dedicated props CLI (previously only accessible via 'grlx sprouts show'), and documents the validate endpoint in the OpenAPI spec.
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
Polishes the cohorts and props NATS API surface:
Changes
GET /api/v1/cohorts/validateendpoint — this NATS handler already existed but wasn't exposed through the CLI HTTP server, so the web UI couldn't reach itCohortValidateResponseschema and/api/v1/cohorts/validatepath documentationgrlx propscommand with subcommands:grlx props get <sprout> [key]— get all or a single propertygrlx props set <sprout> <key> <value>— set a propertygrlx props delete <sprout> <key>— delete a propertygrlx props search <key> [value]— search sprouts by propertyContext
The NATS handlers for cohorts (
cohorts.list,cohorts.get,cohorts.resolve,cohorts.refresh,cohorts.validate) and props (props.getall,props.get,props.set,props.delete) were already implemented, registered, and tested ininternal/natsapi. This PR closes the remaining gaps in the HTTP proxy and CLI layers.All tests pass with
-race.