mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-09 02:59:27 +03:00
docs(commands.rst): fix command name (#1989)
This commit is contained in:
parent
da02f3ad33
commit
f66ab2a516
@ -5,7 +5,7 @@ A command is provided in order to dump the documentation in ``json``, ``yaml`` o
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. 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``).
|
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
|
.. code-block:: bash
|
||||||
|
|
||||||
$ php app/console api:doc:dump --format=json > json-pretty-formatted.json
|
$ php app/console nelmio:apidoc: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 --no-pretty > json-no-pretty.json
|
||||||
|
|
||||||
Every format can override API url. Useful if static documentation is not hosted on API url:
|
Every format can override API url. Useful if static documentation is not hosted on API url:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. 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:
|
For example to generate a static version of your documentation you can use:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. 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.
|
By default, the generated HTML will add the sandbox feature.
|
||||||
If you want to generate a static version of your documentation without sandbox,
|
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
|
.. 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/
|
.. _`configure Swagger UI`: https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user