Skip to content

Commit a6526cc

Browse files
xabbuhlsmith77
authored andcommitted
use the ref role to reference internal resources
1 parent 46a1870 commit a6526cc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Resources/doc/format_listener.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ format will remain unchanged.
106106
- { path: '^/api', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: false }
107107
- { path: '^/', stop: true } # Available for version >= 1.5
108108
109+
.. _media-type-version-extraction:
110+
109111
Media Type Version Extraction
110112
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111113

@@ -140,7 +142,7 @@ To make the version mechanism working :
140142
view:
141143
mime_types:
142144
json: ['application/json', 'application/json;version=1.0', 'application/json;version=1.1']
143-
145+
144146
3 - You should have tagged your entities with version information (@Since, @Until ...)
145147

146148
See `this JMS Serializer article`_ for details about versioning objects.
@@ -157,7 +159,7 @@ If you have to verify if the version is correctly catched you can use something
157159
print $this->container->get('fos_rest.version_listener')->getVersion();
158160
}
159161
160-
Note that this version mechanism is configurable by your own by changing the regular expression in the `media type version regex configuration`_.
162+
Note that this version mechanism is configurable by your own by changing the regular expression in the
163+
:ref:`media type version regex configuration <media-type-version-extraction>`.
161164

162-
.. _`media type version regex configuration`: http://symfony.com/doc/master/bundles/FOSRestBundle/format_listener.html#media-type-version-extraction
163165
.. _`mime type listener`: http://symfony.com/doc/current/cookbook/request/mime_type.html

0 commit comments

Comments
 (0)