Skip to content

Commit bc6bbab

Browse files
committed
fix: use html for code-selector
1 parent bec5187 commit bc6bbab

18 files changed

+120
-120
lines changed

core/content-negotiation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ this configuration might disable the `json` or the `html` on this resource for e
122122

123123
You can specify different accepted formats at operation level too, it's especially convenient for to configure formats available for the `PATCH` method:
124124

125-
[codeSelector]
125+
<code-selector>
126126

127127
```php
128128
<?php
@@ -186,7 +186,7 @@ resources:
186186
</resources>
187187
```
188188

189-
[/codeSelector]
189+
</code-selector>
190190

191191
## Supporting Custom Formats
192192

core/controllers.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ the client.
8282

8383
The routing has not been configured yet because we will add it at the resource configuration level:
8484

85-
[codeSelector]
85+
<code-selector>
8686

8787
```php
8888
<?php
@@ -138,7 +138,7 @@ App\Entity\Book:
138138
</resources>
139139
```
140140

141-
[/codeSelector]
141+
</code-selector>
142142

143143
It is mandatory to set the `method`, `path` and `controller` attributes. They allow API Platform to configure the routing path and
144144
the associated controller respectively.
@@ -147,7 +147,7 @@ the associated controller respectively.
147147

148148
You may want different serialization groups for your custom operations. Just configure the proper `normalization_context` and/or `denormalization_context` in your operation:
149149

150-
[codeSelector]
150+
<code-selector>
151151

152152
```php
153153
<?php
@@ -216,14 +216,14 @@ App\Entity\Book:
216216
</resources>
217217
```
218218

219-
[/codeSelector]
219+
</code-selector>
220220

221221
## Retrieving the Entity
222222

223223
If you want to bypass the automatic retrieval of the entity in your custom operation, you can set `"read"=false` in the
224224
operation attribute:
225225

226-
[codeSelector]
226+
<code-selector>
227227

228228
```php
229229
<?php
@@ -281,7 +281,7 @@ App\Entity\Book:
281281
</resources>
282282
```
283283

284-
[/codeSelector]
284+
</code-selector>
285285

286286
This way, it will skip the `ReadListener`. You can do the same for some other built-in listeners. See [Built-in Event Listeners](events.md#built-in-event-listeners)
287287
for more information.
@@ -301,7 +301,7 @@ for `book_post_discontinuation` when neither `method` nor `route_name` attribute
301301

302302
First, let's create your resource configuration:
303303

304-
[codeSelector]
304+
<code-selector>
305305

306306
```php
307307
<?php
@@ -350,7 +350,7 @@ App\Entity\Book:
350350
</resources>
351351
```
352352

353-
[/codeSelector]
353+
</code-selector>
354354

355355
API Platform will automatically map this `post_publication` operation to the route `book_post_publication`. Let's create a custom action
356356
and its related route using annotations:

core/data-providers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ API Platform provides a few extensions that you can reuse in your custom DataPro
215215
Note that there are a few kinds of extensions which are detailed in [their own chapter of the documentation](extensions.md).
216216
Because extensions are tagged services, you can use the [injection of tagged services](https://symfony.com/blog/new-in-symfony-3-4-simpler-injection-of-tagged-services):
217217

218-
[codeSelector]
218+
<code-selector>
219219

220220
```yaml
221221
services:
@@ -232,7 +232,7 @@ services:
232232
</services>
233233
```
234234

235-
[/codeSelector]
235+
</code-selector>
236236

237237
Your data provider will now have access to the core extensions, here is an example on how to use them:
238238

core/default-order.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ API Platform Core provides an easy way to override the default order of items in
55
By default, items in the collection are ordered in ascending (ASC) order by their resource identifier(s). If you want to
66
customize this order, you must add an `order` attribute on your ApiResource annotation:
77

8-
[codeSelector]
8+
<code-selector>
99

1010
```php
1111
<?php
@@ -36,12 +36,12 @@ App\Entity\Book:
3636
foo: ASC
3737
```
3838
39-
[/codeSelector]
39+
</code-selector>
4040
4141
This `order` attribute is used as an array: the key defines the order field, the values defines the direction.
4242
If you only specify the key, `ASC` direction will be used as default. For example, to order by `foo` & `bar`:
4343

44-
[codeSelector]
44+
<code-selector>
4545

4646
```php
4747
<?php
@@ -76,11 +76,11 @@ App\Entity\Book:
7676
order: ['foo', 'bar']
7777
```
7878

79-
[/codeSelector]
79+
</code-selector>
8080

8181
It's also possible to configure the default order on an association property:
8282

83-
[codeSelector]
83+
<code-selector>
8484

8585
```php
8686
<?php
@@ -110,11 +110,11 @@ App\Entity\Book:
110110
order: ['author.username']
111111
```
112112

113-
[/codeSelector]
113+
</code-selector>
114114

115115
Another possibility is to apply the default order for a specific collection operation, which will override the global default order configuration.
116116

117-
[codeSelector]
117+
<code-selector>
118118

119119
```php
120120
#[ApiResource(
@@ -161,4 +161,4 @@ App\Entity\Book:
161161
name: ASC
162162
```
163163

164-
[/codeSelector]
164+
</code-selector>

core/deprecations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Parchment
6767

6868
It's also possible to deprecate a single property:
6969

70-
[codeSelector]
70+
<code-selector>
7171

7272
```php
7373
<?php
@@ -102,7 +102,7 @@ resources:
102102
deprecation_reason: 'Use the rating property instead'
103103
```
104104
105-
[/codeSelector]
105+
</code-selector>
106106
107107
* With JSON-lD / Hydra, [an `owl:deprecated` annotation property](https://www.w3.org/TR/owl2-syntax/#Annotation_Properties) will be added to the appropriate data structure
108108
* With Swagger / OpenAPI, [a `deprecated` property](https://swagger.io/docs/specification/2-0/paths-and-operations/) will be added

core/dto.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ However, it's sometimes useful to use a specific class to represent the input or
99
For a given resource class, you may want to have a different representation of this class as input (write) or output (read).
1010
To do so, a resource can take an input and/or an output class:
1111

12-
[codeSelector]
12+
<code-selector>
1313

1414
```php
1515
<?php
@@ -52,7 +52,7 @@ resources:
5252
</resources>
5353
```
5454

55-
[/codeSelector]
55+
</code-selector>
5656

5757
The `input` attribute is used during [the deserialization process](serialization.md), when transforming the user-provided data to a resource instance.
5858
Similarly, the `output` attribute is used during [the serialization process](serialization.md). This class represents how the `Book` resource will be represented in the `Response`.
@@ -357,7 +357,7 @@ will be skipped. If `output` is `false`, the serialization process will be skipp
357357

358358
`input` and `output` attributes can be set on a per operation basis:
359359

360-
[codeSelector]
360+
<code-selector>
361361

362362
```php
363363
<?php
@@ -434,7 +434,7 @@ resources:
434434
</resources>
435435
```
436436

437-
[/codeSelector]
437+
</code-selector>
438438

439439
## Input/Output Metadata
440440

core/extending-jsonld-context.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Note that you do not have to provide the `@id` attribute. If you do not provide
7070

7171
It's also possible to replace the Hydra context used by the documentation generator:
7272

73-
[codeSelector]
73+
<code-selector>
7474

7575
```php
7676
<?php
@@ -115,4 +115,4 @@ App\Entity\Book:
115115
</resources>
116116
```
117117

118-
[/codeSelector]
118+
</code-selector>

0 commit comments

Comments
 (0)