Skip to content

Commit 0f5df06

Browse files
authored
Update deprecation.md
Add yaml notation for single property deprecation
1 parent abbe762 commit 0f5df06

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

core/deprecations.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,19 @@ class Review
9898
}
9999
```
100100

101+
```yaml
102+
# api/config/api_platform/resources.yaml
103+
resources:
104+
# ...
105+
App\Entity\Review:
106+
properties:
107+
# ...
108+
letter:
109+
attributes:
110+
deprecation_reason: 'Use the rating property instead'
111+
112+
```
113+
101114
* 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
102115
* With Swagger / OpenAPI, [a `deprecated` property](https://swagger.io/docs/specification/2-0/paths-and-operations/) will be added
103116
* With GraphQL, the [`isDeprecated` and `deprecationReason` properties](https://facebook.github.io/graphql/June2018/#sec-Deprecation) will be added to the schema

0 commit comments

Comments
 (0)