Skip to content

Commit

Permalink
remove remaining hydra: prefix (#1993)
Browse files Browse the repository at this point in the history
* remove remaining hydra: prefix

* more prefixes
  • Loading branch information
dunglas authored Sep 25, 2024
1 parent 93b57c3 commit 56b38a2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions admin/handling-relations.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ For instance, if your API returns:
{
"@context": "/contexts/Book",
"@id": "/books",
"@type": "hydra:Collection",
"hydra:member": [
"@type": "Collection",
"member": [
{
"@id": "/books/07b90597-542e-480b-a6bf-5db223c761aa",
"@type": "https://schema.org/Book",
Expand All @@ -98,7 +98,7 @@ For instance, if your API returns:
}
}
],
"hydra:totalItems": 1
"totalItems": 1
}
```

Expand Down
4 changes: 2 additions & 2 deletions core/angularjs-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ var app = angular
populateHref(data);

if ('getList' === operation) {
var collectionResponse = data['hydra:member'];
var collectionResponse = data['member'];
collectionResponse.metadata = {};

// Put metadata in a property of the collection
angular.forEach(data, function(value, key) {
if ('hydra:member' !== key) {
if ('member' !== key) {
collectionResponse.metadata[key] = value;
}
});
Expand Down
4 changes: 2 additions & 2 deletions core/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ the error will be returned in this format as well:
{
"@context": "/contexts/Error",
"@type": "Error",
"hydra:title": "An error occurred",
"hydra:description": "The product \"1234\" does not exist."
"title": "An error occurred",
"description": "The product \"1234\" does not exist."
}
```

Expand Down
6 changes: 3 additions & 3 deletions core/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ by the library.
By default, all filters are disabled. They must be enabled explicitly.

When a filter is enabled, it automatically appears in the [OpenAPI](openapi.md) and [GraphQL](graphql.md) documentations.
It is also automatically documented as a `hydra:search` property for JSON-LD responses.
It is also automatically documented as a `search` property for JSON-LD responses.

<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/filters?cid=apip"><img src="../symfony/images/symfonycasts-player.png" alt="Filtering and Searching screencast"><br>Watch the Filtering & Searching screencast</a></p>

Expand All @@ -27,7 +27,7 @@ use ApiPlatform\Metadata\QueryParameter;
// This parameter "page" works only on /books
#[GetCollection(uriTemplate: '/books', parameters: ['page' => new QueryParameter])]
// This parameter is available on every operations, key is mandatory
#[QueryParameter(key: 'q', property: 'hydra:freetextQuery')]
#[QueryParameter(key: 'q', property: 'freetextQuery')]
class Book {}
```

Expand Down Expand Up @@ -2019,7 +2019,7 @@ use ApiPlatform\Metadata\QueryParameter;
// This parameter "page" works only on /books
#[GetCollection(uriTemplate: '/books', parameters: ['page' => new QueryParameter])]
// This parameter is available on every operations, key is mandatory
#[QueryParameter(key: 'q', property: 'hydra:freetextQuery')]
#[QueryParameter(key: 'q', property: 'freetextQuery')]
class Book {}
```

Expand Down
4 changes: 2 additions & 2 deletions core/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,8 @@ If the submitted data has denormalization errors, the HTTP status code will be s
{
"@context": "/api/contexts/ConstraintViolationList",
"@type": "ConstraintViolationList",
"hydra:title": "An error occurred",
"hydra:description": "boolean: This value should be of type bool.\nproperty1: This value should be of type string.",
"title": "An error occurred",
"description": "boolean: This value should be of type bool.\nproperty1: This value should be of type string.",
"violations": [
{
"propertyPath": "boolean",
Expand Down

0 comments on commit 56b38a2

Please sign in to comment.