This document summarizes what climate already supports when generating CLIs,
what is partially supported, and what should be designed/implemented next.
- OpenAPI version: 3.x (3.0 / 3.1 input accepted by parser/validator)
- Main commands affected:
generate,compose,mock,skill generate
| OpenAPI feature | Status | Current behavior | Next step |
|---|---|---|---|
info, paths, HTTP methods |
✅ Implemented | Used as core input for command tree generation | Keep stable |
| Path/query/header parameters | ✅ Implemented | Converted to CLI flags | Add richer validations from schema constraints |
Request body (application/json) |
✅ Implemented | Supported via generated payload flags | Add optional strict schema validation before send |
| Response handling | ✅ Implemented | Structured output + generated error envelope | Add per-status typed formatting hooks |
| Auth: API key / bearer / basic / OAuth2 | ✅ Implemented | Mapped to generated auth flags/env vars | Add multi-scheme policy docs |
| Tags → command groups | ✅ Implemented | Tag-based group hierarchy | Add optional custom grouping strategies |
components.schemas + $ref |
✅ Implemented | Used in generator and mock response synthesis | Improve support for schema combiners |
Multi-spec composition (compose) |
✅ Implemented | Path prefixing + component namespacing + merge | Add callbacks/webhooks merge policy |
Local mock simulator (mock) |
✅ Implemented | Auto responses from spec schema + latency | Add optional examples-first mode |
enum |
✅ Implemented (mock) / |
Mock prefers first enum value | Add flag-level enum validation/help text |
allOf, oneOf, anyOf, not |
Core flow works for simple schemas; advanced combiners not fully synthesized | Add schema normalizer for combiners | |
servers and server variables |
✅ Implemented | Generated CLIs use primary server URL and support server-template interpolation via --server-var-<name> and <CLI>_SERVER_VAR_<NAME> env vars |
Keep stable |
callbacks |
Not mapped to generated CLI surface; climate mock can generate and emit synthetic event payloads to target endpoints via flags |
Add event command model (events subscribe/events trigger) |
|
webhooks (3.1) |
Top-level webhook declarations are not yet parsed as first-class objects; mock has event emission mode for local webhook testing | Add webhook simulation and event ingestion model | |
| Links | ❌ Planned | Ignored | Add optional “follow-up command hint” output |
Examples (example / examples) |
Not consistently preferred in generation | Use examples as first-class sample payload/response source |
Some APIs are event-driven and include webhooks/callbacks instead of (or in addition to) plain request/response endpoints.
Proposed direction for generated CLIs:
- Expose webhook declarations as event commands
myapi events listmyapi events emit <event-name> --data-json ...(test mode)
- Support local receiver
myapi events listen --port 8081to receive and inspect payloads
- Support production replay/import
myapi events import --file payload.json --event <name>myapi events replay --source prod-export.ndjson
- Compose awareness
- In
compose, namespace event names with prefix (same as path/components)
- In
- Mock integration
climate mockcan emit synthetic webhook payloads at intervals or on demand for integration tests
Pagination should be generated as a first-class UX pattern, regardless of API style:
- Page/pageSize style (
page,size,limit,offset) - Cursor style (
cursor,next,before,after) - Token style (
nextPageToken) - Link-header style (
Link: <...>; rel="next")
Proposed CLI conventions:
--allto auto-fetch all pages safely--max-items <n>as guardrail--page-size <n>override when supported--starting-token <token>for resume--pagination-debugto print paging metadata
Safety defaults:
--allshould require confirmation for very large transfers unless--yesis set- bounded retries/backoff for transient failures
- Pagination abstraction + generated paging flags (
--all,--max-items) callbackssupport in generator command treewebhookssupport + local listener/emitter helpers- examples-first generation mode (payloads + mock responses)
- advanced schema combiner normalization (
allOf/oneOf/anyOf)