Repository navigation
v0.7.0
Interactive request-body forms
clic now compiles an OpenAPI operation's request-body schema into an interactive terminal form. Pass -i (--interactive) to a body-carrying command and fill it in instead of hand-writing JSON:
clic -i --server https://petstore3.swagger.io/api/v3 \
https://petstore3.swagger.io/api/v3/openapi.json pet create- Text inputs for strings/numbers, a confirm for booleans, a select for
enumvalues, and grouped fields for nested objects. - Scalar lists are entered one per line; lists of objects are gathered with a repeatable "add another?" prompt.
- Required fields are validated; optional fields left blank are omitted.
--bodystill works and takes precedence —-ionly prompts when no--bodyis given.
Breaking: global flags now go before the spec
clic's own flags (--server, -i, and the auth flags --token / --username / --password / --api-key) are now parsed by the launcher before the spec, and everything after the spec is passed through to the generated app as its own arguments:
# before: clic ./api.yaml --token "$T" users get 42
# now: clic --token "$T" ./api.yaml users get 42This makes the spec a clean namespace boundary, so a clic flag can no longer collide with a spec parameter of the same name (e.g. a server query parameter).