Merge pull request #1182 from nelmio/GuilhemN-patch-2

Several doc fixes
This commit is contained in:
David Buchmann 2018-01-10 17:03:30 +01:00 committed by GitHub
commit 667569be7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,9 @@ For models, it supports the Symfony serializer and the JMS serializer.
Migrate from 2.x to 3.0 Migrate from 2.x to 3.0
----------------------- -----------------------
[To migrate from 2.x to 3.0, just follow our guide.](https://github.com/nelmio/NelmioApiDocBundle/blob/master/UPGRADE-3.0.md) `To migrate from 2.x to 3.0, just follow our guide.`__
__ https://github.com/nelmio/NelmioApiDocBundle/blob/master/UPGRADE-3.0.md
Installation Installation
------------ ------------
@ -80,11 +82,15 @@ Open a command console, enter your project directory and execute the following c
path_patterns: # an array of regexps path_patterns: # an array of regexps
- ^/api(?!/doc$) - ^/api(?!/doc$)
  .. versionadded:: 3.1
       The ``areas`` config option was added in version 3.1. You had to use ``routes`` in 3.0 instead.
How does this bundle work? How does this bundle work?
-------------------------- --------------------------
It generates you a swagger documentation from your symfony app thanks to It generates you a swagger documentation from your symfony app thanks to
_Describers_. Each of these _Describers_ extract infos from various sources. **Describers**. Each of these **Describers** extract infos from various sources.
For instance, one extract data from SwaggerPHP annotations, one from your For instance, one extract data from SwaggerPHP annotations, one from your
routes, etc. routes, etc.
@ -176,7 +182,7 @@ It has two options:
* @Model(type=User::class, groups={"non_sensitive_data"}) * @Model(type=User::class, groups={"non_sensitive_data"})
*/ */
.. warning:: .. caution::
The ``@Model`` annotation acts like a ``@Schema`` annotation. If you nest it with a ``@Schema`` annotation, the bundle will consider that The ``@Model`` annotation acts like a ``@Schema`` annotation. If you nest it with a ``@Schema`` annotation, the bundle will consider that
you're documenting an array of models. you're documenting an array of models.