docs CLI
Import curl and OpenAPI
Turn curl commands and OpenAPI documents into request files.
Convert curl into Resterm request files:
resterm --from-curl "curl https://example.com -H 'X-Test: 1'" --http-out example.http
resterm --from-curl ./requests.curl --http-out requests.http
cat requests.curl | resterm --from-curl - --http-out requests.httpGenerate a collection from OpenAPI:
resterm \
--from-openapi openapi.yml \
--http-out openapi.http \
--openapi-mode both \
--openapi-resolve-refs \
--openapi-server-index 1--from-openapi also takes an http(s) URL and fetches the spec directly:
resterm --from-openapi https://petstore3.swagger.io/api/v3/openapi.json --http-out petstore.httpFor a URL spec, relative servers URLs are resolved against it, and --openapi-resolve-refs
follows external $refs over HTTP. --insecure and --proxy apply to the fetch.
Mock generation emits every concrete OpenAPI response status and media example. Named examples become named scenarios, and when a response has no example Resterm samples its schema. Range responses such as 2XX and default are skipped. External examples and binary example bodies cannot produce a deterministic inline mock, so they are dropped with a diagnostic.