Exit codes:0 success, 1 unreadable or invalid HAR, or no API traffic found, 2 bad arguments.
Output files
File
Generator
Notes
openapi.yaml / .json
built in
OpenAPI 3.0.3. Always written.
AUTH.md
built in
Always written.
client.ts
typescript
No runtime dependencies. Passes tsc --strict.
client.py
python
Needs requests.
examples.sh
curl
Uses $TOKEN and $BASE.
postman_collection.json
postman
Collection v2.1 with baseUrl and token variables.
Operation naming
Operation IDs come from the method and path: GET /users/{user_id}/posts becomes getUserPosts. Collections keep the plural (getPets), items use the singular (getPet). Duplicates get a numeric suffix. Python methods are the snake_case form (get_user_posts).
OpenAPI extensions
Field
Meaning
x-harspec-samples
Number of captured requests behind the operation. Low numbers mean low confidence.
Using the spec with other tools
Tool
How
Swagger Editor / Swagger UI
Paste or upload openapi.yaml.
Postman, Insomnia, Bruno
Import the OpenAPI file or the Postman collection.
openapi-generator
openapi-generator-cli generate -i openapi.yaml -g go -o ./client for languages harspec does not cover yet.