docs(commands.rst): fix command name (#1989)

This commit is contained in:
Tobias Sette 2022-05-02 17:39:33 -03:00 committed by GitHub
parent da02f3ad33
commit f66ab2a516
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@ A command is provided in order to dump the documentation in ``json``, ``yaml`` o
.. code-block:: bash
$ php app/console api:doc:dump [--format="..."]
$ php app/console nelmio:apidoc:dump [--format="..."]
The ``--format`` option allows to choose the format (default is: ``json``).
@ -14,20 +14,20 @@ without whitespace, use the ``--no-pretty`` option.
.. code-block:: bash
$ php app/console api:doc:dump --format=json > json-pretty-formatted.json
$ php app/console api:doc:dump --format=json --no-pretty > json-no-pretty.json
$ php app/console nelmio:apidoc:dump --format=json > json-pretty-formatted.json
$ php app/console nelmio:apidoc:dump --format=json --no-pretty > json-no-pretty.json
Every format can override API url. Useful if static documentation is not hosted on API url:
.. code-block:: bash
$ php app/console api:doc:dump --format=yaml --server-url "http://example.com/api" > api.yaml
$ php app/console nelmio:apidoc:dump --format=yaml --server-url "http://example.com/api" > api.yaml
For example to generate a static version of your documentation you can use:
.. code-block:: bash
$ php app/console api:doc:dump --format=html > api.html
$ php app/console nelmio:apidoc:dump --format=html > api.html
By default, the generated HTML will add the sandbox feature.
If you want to generate a static version of your documentation without sandbox,
@ -40,6 +40,6 @@ or configure UI configuration, use the ``--html-config`` option.
.. code-block:: bash
$ php app/console api:doc:dump --format=html --html-config '{"assets_mode":"offline","server_url":"https://example.com","swagger_ui_config":{"supportedSubmitMethods":[]}}' > api.html
$ php app/console nelmio:apidoc:dump --format=html --html-config '{"assets_mode":"offline","server_url":"https://example.com","swagger_ui_config":{"supportedSubmitMethods":[]}}' > api.html
.. _`configure Swagger UI`: https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/