You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: client-generator/index.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# The API Platform Client Generator
2
2
3
-
Client Generator is the fastest way to scaffold fully-featured webapps and native mobile apps from APIs supporting the [Hydra](http://www.hydra-cg.com/) format.
3
+
Client Generator is the fastest way to scaffold fullyfeatured webapps and native mobile apps from APIs supporting the [Hydra](http://www.hydra-cg.com/) format.
Copy file name to clipboardExpand all lines: core/serialization.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ all set!
58
58
59
59
It is simple to specify what groups to use in the API system:
60
60
61
-
1. Add the `normalizationContext` and `denormalizationContext` annotation properties to the `@ApiResource` annotation, and specify which groups to use. Here you see that we add `read` and `write`, respectively. You can use any group names you wish.
61
+
1. Add the `normalizationContext` and `denormalizationContext` annotation properties to the `@ApiResource` annotation, and specify which groups to use. Here you see that we add `read` and `write`, respectively. You can use any group names you wish.
62
62
2. Apply the `@Groups` annotation to properties in the object.
63
63
64
64
```php
@@ -129,7 +129,7 @@ App\Entity\Book:
129
129
```
130
130
131
131
In the previous example, the `name` property will be visible when reading (`GET`) the object, and it will also be available
132
-
to write (`PUT/POST`). The `author` property will be write-only; it will not be visible when serialized responses are
132
+
to write (`PUT/POST`). The `author` property will be write-only; it will not be visible when serialized responses are
133
133
returned by the API.
134
134
135
135
Internally, API Platform passes the value of the `normalization_context` to the Symfony Serializer during the normalization
@@ -415,7 +415,7 @@ final class BookContextBuilder implements SerializerContextBuilderInterface
415
415
```
416
416
417
417
If the user has the `ROLE_ADMIN` permission and the subject is an instance of Book, `admin_input` group will be dynamically added to the
418
-
denormalization context. The `$normalization` variable lets you check whether the context is for normalization (if `TRUE`) or denormalization
418
+
denormalization context. The `$normalization` variable lets you check whether the context is for normalization (if `TRUE`) or denormalization
419
419
(`FALSE`).
420
420
421
421
## Changing the Serialization Context on a Per-item Basis
@@ -500,8 +500,8 @@ class BookAttributeNormalizer implements ContextAwareNormalizerInterface, Normal
500
500
This will add the serialization group `can_retrieve_book` only if the currently logged-in user has access to the given book
501
501
instance.
502
502
503
-
Note: In this example, we use the `TokenStorageInterface` to verify access to the book instance. However, Symfony
504
-
provides many useful other services that might be better suited to your use case. For example, the [`AuthorizationChecker`](https://symfony.com/doc/current/components/security/authorization.html#authorization-checker).
503
+
Note: In this example, we use the `TokenStorageInterface` to verify access to the book instance. However, Symfony
504
+
provides many useful other services that might be better suited to your use case. For example, the [`AuthorizationChecker`](https://symfony.com/doc/current/components/security/authorization.html#authorization-checker).
505
505
506
506
## Name Conversion
507
507
@@ -524,7 +524,7 @@ api_platform:
524
524
525
525
## Decorating a Serializer and Adding Extra Data
526
526
527
-
In the following example, we will see how we add extra informations to the serialized output. Here is how we add the
527
+
In the following example, we will see how we add extra informations to the serialized output. Here is how we add the
528
528
date on each request in `GET`:
529
529
530
530
```yaml
@@ -599,7 +599,7 @@ API Platform is able to guess the entity identifier using [Doctrine metadata](ht
599
599
It also supports composite identifiers.
600
600
601
601
If you are not using the Doctrine ORM Provider, you must explicitly mark the identifier using the `identifier` attribute of
602
-
the `ApiPlatform\Core\Annotation\ApiProperty` annotation. For example:
602
+
the `ApiPlatform\Core\Annotation\ApiProperty` annotation. For example:
603
603
604
604
605
605
```php
@@ -644,7 +644,7 @@ App\Entity\Book:
644
644
```
645
645
646
646
In some cases, you will want to set the identifier of a resource from the client (e.g. a client-side generated UUID, or a slug).
647
-
In such cases, you must make the identifier property a writable class property. Specifically, to use client-generated IDs, you
647
+
In such cases, you must make the identifier property a writable class property. Specifically, to use client-generated IDs, you
648
648
must do the following:
649
649
650
650
1. create a setter for the identifier of the entity (e.g. `public function setId(string $id)`) or make it a `public` property ,
0 commit comments