Reference

Commands

The Artisan commands of the generator, their arguments, options and exit codes.

openapi:generate

Generates every document of the configuration, in each language, validates it and writes it.

Terminal
php artisan openapi:generate [--document=*] [--strict] [--dry-run] [--format=] [--stdout]
--document
string, repeatable
The documents to generate, by name. Default: all of them. An unknown name is an invalid call.
--strict
flag
Fails a document on its first warning; the document is not written.
--dry-run
flag
Generates and validates, writes nothing.
--format
json|yaml
Instead of the configured format; the extension of the file follows it.
--stdout
flag
Prints the document instead of writing it. One document and one language; the diagnostics go to the error output.

The diagnostics are grouped by route: warnings by default, infos with -v, errors only with -q.

Exit codeMeaning
0every document is written (or valid, with --dry-run)
1a document has an error, or a warning with --strict; it is not written
2the configuration or the options are invalid; nothing is generated

openapi:inspect

Shows what the generator understood of one route, or of one webhook: its operation after every pass (operation id, summary, description, tags, deprecation, security, parameters, body, responses) and every diagnostic about it, whatever the verbosity.

Terminal
php artisan openapi:inspect {route} [--document=]
route
string required
The name of the route (books.show), its URI (api/books/{book}, every method), or its method and URI ("GET api/books"). The webhooks of that name (article.published) are shown too Since 1.3.
--document
string
The document to look in. Default: the first one.
Exit codeMeaning
0the route is in the document
1it is not
2the configuration or the document is invalid

about

php artisan about has an OpenAPI Generator section: the version of the package, the names of the documents, and whether the JSON:API integration is enabled (with the major version of ark4ne/laravel-json-api).