The fastest way to see something useful is to print something out to the console.

lint

This will print a summary of your linting results. The lint command will use the Recommended RuleSet.

Just want to try things out?

If you don’t have an OpenAPI spec and you want to see something, you can run it against one of the test specifications. A good one to try is the petstorev3.json specification.

lint

Available Flags

lint supports the following flags

Short Full Input Description
-d –details bool Show full details of the linting report
-c –category string Used with -d, Show a single category of results
-e –errors bool Used with -d, Show only reported errors
-x –silent bool Show no output, except for the linting result
-s –snippets bool Used with -d, shows highlighted code in console
-h –help bool Show help screen and all flag details

Global Flags

lint supports the following global flags

Short Full Input Description
-r –ruleset string Use an existing ruleset file for linting
-t –time bool Show how long it took to lint the spec in (ms)

Full flags begin with a double hyphen.

Examples

Want something easy to copy and paste?

Using an existing RuleSet

lint

Single category

lint

Single category with snippets

lint

Only show errors

lint