Skip to content
Nav

Thunder Client

composer require langsys/openapi-docs-generator
Packagist version Monthly downloads License PHP 8.1+ Laravel 10 / 11

Generate Thunder Client collections directly from your OpenAPI documentation. The generator reads api-docs.json and creates a ready-to-use tc_col_{slug}.json that Thunder Client auto-loads.

Terminal window
php artisan openapi:generate --thunder-client
# or, if api-docs.json already exists:
php artisan openapi:thunder

It:

  1. Creates a folder for each API tag
  2. Creates a request for each endpoint with method, URL, headers, auth, and body
  3. Converts OpenAPI path parameters ({id}) to Thunder Client variables ({{id}})
  4. Prefixes URLs with a configurable base URL variable ({{url}}/api/users)
  5. Builds request bodies from schema examples for POST/PUT/PATCH
  6. Optionally generates an environment file from .env

Auth mappings live under thunder_client.auth and must match your OpenAPI security scheme names (bearer, header API key, basic). If an endpoint supports multiple schemes, the generator creates one request per scheme.

The environment file is only created once — never overwritten. Set 'environment' => null to skip.

Merge behavior: the generator never overwrites existing requests. Existing requests, folders, and the collection _id are preserved; only new endpoints (by method + URL path) are appended. Customize freely in Thunder Client and re-run.

Feedback