diff --git a/core/design.md b/core/design.md index e838769dd97..bdd3f5d46b0 100644 --- a/core/design.md +++ b/core/design.md @@ -1,8 +1,8 @@ # General Design Considerations Since you only need to describe the structure of the data to expose, API Platform is both -[a "design-first" and "code-first"](https://swagger.io/blog/api-design/design-first-or-code-first-api-development/) -API framework. However, the "design-first" methodology is strongly recommended: first you design the +[a "design-first" and "code-first"](https://swagger.io/blog/code-first-vs-design-first-api/) API +framework. However, the "design-first" methodology is strongly recommended: first you design the **public shape** of API endpoints. To do so, you have to write a plain old PHP object (POPO) representing the input and output of your diff --git a/core/serialization.md b/core/serialization.md index 4cbcf3c61de..0a0659ccf4f 100644 --- a/core/serialization.md +++ b/core/serialization.md @@ -308,22 +308,22 @@ class Book # api/config/api_platform/resources/Book.yaml App\ApiResource\Book: normalizationContext: - groups: ['get'] + groups: ["get"] operations: ApiPlatform\Metadata\Get: ~ ApiPlatform\Metadata\Get: ~ ApiPlatform\Metadata\Patch: normalizationContext: - groups: ['patch'] + groups: ["patch"] # The YAML syntax is only supported for Symfony # api/config/serializer/Book.yaml App\ApiResource\Book: attributes: name: - groups: ['get', 'patch'] + groups: ["get", "patch"] author: - groups: ['get'] + groups: ["get"] ``` ```xml @@ -452,16 +452,16 @@ class Book # api/config/api_platform/resources/Book.yaml App\ApiResource\Book: normalizationContext: - groups: ['book'] + groups: ["book"] # The YAML syntax is only supported for Symfony # api/config/serializer/Book.yaml App\ApiResource\Book: attributes: name: - groups: ['book'] + groups: ["book"] author: - groups: ['book'] + groups: ["book"] ``` @@ -597,18 +597,18 @@ class Person # api/config/api_platform/resources/Person.yaml App\ApiResource\Person: normalizationContext: - groups: ['person'] + groups: ["person"] denormalizationContext: - groups: ['person'] + groups: ["person"] # The YAML syntax is only supported for Symfony # api/config/serializer/Person.yaml App\ApiResource\Person: attributes: name: - groups: ['person'] + groups: ["person"] parent: - groups: ['person'] + groups: ["person"] ``` @@ -870,18 +870,18 @@ App\Entity\Greeting: operations: ApiPlatform\Metadata\GetCollection: normalizationContext: - groups: 'greeting:collection:get' + groups: "greeting:collection:get" # The YAML syntax is only supported for Symfony # api/config/serializer/Greeting.yaml App\Entity\Greeting: attributes: id: - groups: 'greeting:collection:get' + groups: "greeting:collection:get" name: - groups: 'greeting:collection:get' + groups: "greeting:collection:get" sum: - groups: 'greeting:collection:get' + groups: "greeting:collection:get" ``` @@ -932,18 +932,18 @@ class Book # api/config/api_platform/resources/Book.yaml App\ApiResource\Book: normalizationContext: - groups: ['book:output'] + groups: ["book:output"] denormalizationContext: - groups: ['book:input'] + groups: ["book:input"] # The YAML syntax is only supported for Symfony # api/config/serializer/Book.yaml App\ApiResource\Book: attributes: active: - groups: ['book:output', 'admin:input'] + groups: ["book:output", "admin:input"] name: - groups: ['book:output', 'book:input'] + groups: ["book:output", "book:input"] ``` diff --git a/core/state-providers.md b/core/state-providers.md index a50db2766c3..5da3e85c78e 100644 --- a/core/state-providers.md +++ b/core/state-providers.md @@ -435,13 +435,13 @@ use the following snippet: services: # ... App\State\BlogPostProvider: - tags: [ 'api_platform.state_provider' ] + tags: ["api_platform.state_provider"] # api/config/services.yaml services: # ... App\State\BookRepresentationProvider: arguments: - $itemProvider: '@api_platform.doctrine.orm.state.item_provider' - tags: [ 'api_platform.state_provider' ] + $itemProvider: "@api_platform.doctrine.orm.state.item_provider" + tags: ["api_platform.state_provider"] ```