From 56b38a20b919b6b1873a77ab024e718d7f63318c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Wed, 25 Sep 2024 14:08:23 +0200 Subject: [PATCH] remove remaining hydra: prefix (#1993) * remove remaining hydra: prefix * more prefixes --- admin/handling-relations.md | 6 +++--- core/angularjs-integration.md | 4 ++-- core/errors.md | 4 ++-- core/filters.md | 6 +++--- core/validation.md | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/admin/handling-relations.md b/admin/handling-relations.md index 46aa0553ddf..3fe9d63c49c 100644 --- a/admin/handling-relations.md +++ b/admin/handling-relations.md @@ -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", @@ -98,7 +98,7 @@ For instance, if your API returns: } } ], - "hydra:totalItems": 1 + "totalItems": 1 } ``` diff --git a/core/angularjs-integration.md b/core/angularjs-integration.md index c55eed300cf..63aec43ddfb 100644 --- a/core/angularjs-integration.md +++ b/core/angularjs-integration.md @@ -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; } }); diff --git a/core/errors.md b/core/errors.md index eb05bac5b11..5d8ffd6be0d 100644 --- a/core/errors.md +++ b/core/errors.md @@ -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." } ``` diff --git a/core/filters.md b/core/filters.md index 08f2e32e1fd..eb23a067a35 100644 --- a/core/filters.md +++ b/core/filters.md @@ -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.

Filtering and Searching screencast
Watch the Filtering & Searching screencast

@@ -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 {} ``` @@ -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 {} ``` diff --git a/core/validation.md b/core/validation.md index 2a5a32fcdfa..44d27b47653 100644 --- a/core/validation.md +++ b/core/validation.md @@ -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",