joolfe / postman-to-openapi

🛸 Convert postman collection to OpenAPI
MIT License
577 stars 99 forks source link

CLI command without arguments should print usage message #259

Closed kayx23 closed 11 months ago

kayx23 commented 1 year ago

Current State

Currently, if you just run the CLI command without arguments

$ p2o
error: missing required argument 'collection'

Proposed Enhancement

Instead of printing the error message, it is a better idea to print usage message to help users understand how to use the CLI tool.

Optionally you could include a welcome message or ASCII art.

Env

$ p2o -version
3.0.1
joolfe commented 11 months ago

Hi @kayx23,

The return of errors is intentionally, when you use CI tools like GitHub actions or Jenkins you want to have an exit code with an error, not a help message. For customer manual use you will understand the error also and just using the -h option you will have the help information so....

Best regards.