Skip to content

feat(api): add cohorts.validate HTTP proxy, props CLI commands, and OpenAPI spec#271

Merged
taigrr merged 1 commit into
masterfrom
cd/nats-cohorts-props-polish
Mar 31, 2026
Merged

feat(api): add cohorts.validate HTTP proxy, props CLI commands, and OpenAPI spec#271
taigrr merged 1 commit into
masterfrom
cd/nats-cohorts-props-polish

Conversation

@taigrr
Copy link
Copy Markdown
Member

@taigrr taigrr commented Mar 31, 2026

Summary

Polishes the cohorts and props NATS API surface:

Changes

  • HTTP proxy: Add GET /api/v1/cohorts/validate endpoint — this NATS handler already existed but wasn't exposed through the CLI HTTP server, so the web UI couldn't reach it
  • OpenAPI spec: Add CohortValidateResponse schema and /api/v1/cohorts/validate path documentation
  • CLI: Add grlx props command with subcommands:
    • grlx props get <sprout> [key] — get all or a single property
    • grlx props set <sprout> <key> <value> — set a property
    • grlx props delete <sprout> <key> — delete a property
    • grlx props search <key> [value] — search sprouts by property
  • Tests: Add HTTP route test for cohorts validate endpoint

Context

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 in internal/natsapi. This PR closes the remaining gaps in the HTTP proxy and CLI layers.

All tests pass with -race.

…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.
@taigrr taigrr merged commit f573af3 into master Mar 31, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant