Skip to content

Commit 3acda54

Browse files
Merge pull request api-platform#1576 from vincentchalamon/docs/https
docs: replace http://schema.org by https://schema.org
2 parents 1f477c5 + b0261b9 commit 3acda54

16 files changed

+68
-68
lines changed

admin/handling-relations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ For instance, if your API returns:
6262
"hydra:member": [
6363
{
6464
"@id": "/books/07b90597-542e-480b-a6bf-5db223c761aa",
65-
"@type": "http://schema.org/Book",
65+
"@type": "https://schema.org/Book",
6666
"title": "War and Peace",
6767
"author": {
6868
"@id": "/authors/d7a133c1-689f-4083-8cfc-afa6d867f37d",
69-
"@type": "http://schema.org/Author",
69+
"@type": "https://schema.org/Author",
7070
"firstName": "Leo",
7171
"lastName": "Tolstoi"
7272
}

admin/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ You can **customize everything** by using provided React Admin and [Material UI]
2121
* Automatically generates an admin interface for all the resources of the API thanks to hypermedia features of Hydra
2222
* Generates 'list', 'create', 'show', and 'edit' screens, as well as a delete button
2323
* Generates suitable inputs and fields according to the API doc (e.g. number HTML input for numbers, checkbox for booleans, selectbox for relationships...)
24-
* Generates suitable inputs and fields according to Schema.org types if available (e.g. email field for `http://schema.org/email`)
24+
* Generates suitable inputs and fields according to Schema.org types if available (e.g. email field for `https://schema.org/email`)
2525
* Handles relationships
2626
* Supports pagination
2727
* Supports filters and ordering

admin/schema.org.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ The following examples will use [API Platform Core](../core/) to create such API
1212
By default, IRIs of related objects are displayed in lists and forms.
1313
However, it is often more user-friendly to display a string representation of the resource (such as its name) instead of its ID.
1414

15-
To configure which property should be shown to represent your entity, map the property containing the name of the object with the `http://schema.org/name` type:
15+
To configure which property should be shown to represent your entity, map the property containing the name of the object with the `https://schema.org/name` type:
1616

1717
```php
1818
// api/src/Entity/Person.php
1919

20-
#[ApiProperty(iri: "http://schema.org/name")]
20+
#[ApiProperty(iri: "https://schema.org/name")]
2121
private $name;
2222
```
2323

@@ -27,8 +27,8 @@ Besides, it is also possible to use the documentation to customize some fields a
2727

2828
The following Schema.org types are currently supported by API Platform Admin:
2929

30-
* `http://schema.org/email`: the field will be rendered using the `<EmailField>` React Admin component
31-
* `http://schema.org/url`: the field will be rendered using the `<UrlField>` React Admin component
32-
* `http://schema.org/identifier`: the field will be formatted properly in inputs
30+
* `https://schema.org/email`: the field will be rendered using the `<EmailField>` React Admin component
31+
* `https://schema.org/url`: the field will be rendered using the `<UrlField>` React Admin component
32+
* `https://schema.org/identifier`: the field will be formatted properly in inputs
3333

3434
Note: if you already use validation on your properties, the semantics are already configured correctly (see [the correspondence table](../core/validation.md#open-vocabulary-generated-from-validation-metadata))!

core/extending-jsonld-context.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ namespace App\Entity;
1717
use ApiPlatform\Core\Annotation\ApiProperty;
1818
use ApiPlatform\Core\Annotation\ApiResource;
1919

20-
#[ApiResource(iri: "http://schema.org/Book")]
20+
#[ApiResource(iri: "https://schema.org/Book")]
2121
class Book
2222
{
2323
// ...
2424

2525
#[ApiProperty(
26-
iri: "http://schema.org/name",
26+
iri: "https://schema.org/name",
2727
attributes: [
2828
"jsonld_context" => [
2929
"@id" => "http://yourcustomid.com",

core/external-vocabularies.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ namespace App\Entity;
1414
use ApiPlatform\Core\Annotation\ApiProperty;
1515
use ApiPlatform\Core\Annotation\ApiResource;
1616

17-
#[ApiResource(iri: "http://schema.org/Book")]
17+
#[ApiResource(iri: "https://schema.org/Book")]
1818
class Book
1919
{
2020
// ...
2121

22-
#[ApiProperty(iri: "http://schema.org/name")]
22+
#[ApiProperty(iri: "https://schema.org/name")]
2323
public $name;
2424

2525
// ...
@@ -58,17 +58,17 @@ Built-in mapping is:
5858

5959
Constraints | Schema.org type |
6060
---------------------------------------------------- |-----------------------------------|
61-
`Symfony\Component\Validator\Constraints\Url` | `http://schema.org/url` |
62-
`Symfony\Component\Validator\Constraints\Email` | `http://schema.org/email` |
63-
`Symfony\Component\Validator\Constraints\Uuid` | `http://schema.org/identifier` |
64-
`Symfony\Component\Validator\Constraints\CardScheme` | `http://schema.org/identifier` |
65-
`Symfony\Component\Validator\Constraints\Bic` | `http://schema.org/identifier` |
66-
`Symfony\Component\Validator\Constraints\Iban` | `http://schema.org/identifier` |
67-
`Symfony\Component\Validator\Constraints\Date` | `http://schema.org/Date` |
68-
`Symfony\Component\Validator\Constraints\DateTime` | `http://schema.org/DateTime` |
69-
`Symfony\Component\Validator\Constraints\Time` | `http://schema.org/Time` |
70-
`Symfony\Component\Validator\Constraints\Image` | `http://schema.org/image` |
71-
`Symfony\Component\Validator\Constraints\File` | `http://schema.org/MediaObject` |
72-
`Symfony\Component\Validator\Constraints\Currency` | `http://schema.org/priceCurrency` |
73-
`Symfony\Component\Validator\Constraints\Isbn` | `http://schema.org/isbn` |
74-
`Symfony\Component\Validator\Constraints\Issn` | `http://schema.org/issn` |
61+
`Symfony\Component\Validator\Constraints\Url` | `https://schema.org/url` |
62+
`Symfony\Component\Validator\Constraints\Email` | `https://schema.org/email` |
63+
`Symfony\Component\Validator\Constraints\Uuid` | `https://schema.org/identifier` |
64+
`Symfony\Component\Validator\Constraints\CardScheme` | `https://schema.org/identifier` |
65+
`Symfony\Component\Validator\Constraints\Bic` | `https://schema.org/identifier` |
66+
`Symfony\Component\Validator\Constraints\Iban` | `https://schema.org/identifier` |
67+
`Symfony\Component\Validator\Constraints\Date` | `https://schema.org/Date` |
68+
`Symfony\Component\Validator\Constraints\DateTime` | `https://schema.org/DateTime` |
69+
`Symfony\Component\Validator\Constraints\Time` | `https://schema.org/Time` |
70+
`Symfony\Component\Validator\Constraints\Image` | `https://schema.org/image` |
71+
`Symfony\Component\Validator\Constraints\File` | `https://schema.org/MediaObject` |
72+
`Symfony\Component\Validator\Constraints\Currency` | `https://schema.org/priceCurrency` |
73+
`Symfony\Component\Validator\Constraints\Isbn` | `https://schema.org/isbn` |
74+
`Symfony\Component\Validator\Constraints\Issn` | `https://schema.org/issn` |

core/file-upload.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ use Vich\UploaderBundle\Mapping\Annotation as Vich;
6868
*/
6969
#[ORM\Entity]
7070
#[ApiResource(
71-
iri: 'http://schema.org/MediaObject',
71+
iri: 'https://schema.org/MediaObject',
7272
normalizationContext: ['groups' => ['media_object:read']],
7373
itemOperations: ['get'],
7474
collectionOperations: [
@@ -102,7 +102,7 @@ class MediaObject
102102
#[ORM\Id, ORM\Column, ORM\GeneratedValue]
103103
private ?int $id = null;
104104
105-
#[ApiProperty(iri: 'http://schema.org/contentUrl')]
105+
#[ApiProperty(iri: 'https://schema.org/contentUrl')]
106106
#[Groups(['media_object:read'])]
107107
public ?string $contentUrl = null;
108108
@@ -215,7 +215,7 @@ your data, you will get a response looking like this:
215215

216216
```json
217217
{
218-
"@type": "http://schema.org/MediaObject",
218+
"@type": "https://schema.org/MediaObject",
219219
"@id": "/media_objects/<id>",
220220
"contentUrl": "<url>"
221221
}
@@ -253,14 +253,14 @@ use Symfony\Component\HttpFoundation\File\File;
253253
use Vich\UploaderBundle\Mapping\Annotation as Vich;
254254

255255
#[ORM\Entity]
256-
#[ApiResource(iri: 'http://schema.org/Book')]
256+
#[ApiResource(iri: 'https://schema.org/Book')]
257257
class Book
258258
{
259259
// ...
260260

261261
#[ORM\ManyToOne(targetEntity: MediaObject::class)]
262262
#[ORM\JoinColumn(nullable: true)]
263-
#[ApiProperty(iri: 'http://schema.org/image')]
263+
#[ApiProperty(iri: 'https://schema.org/image')]
264264
public ?MediaObject $image = null;
265265

266266
// ...
@@ -355,7 +355,7 @@ use Vich\UploaderBundle\Mapping\Annotation as Vich;
355355
*/
356356
#[ORM\Entity]
357357
#[ApiResource(
358-
iri: 'http://schema.org/Book',
358+
iri: 'https://schema.org/Book',
359359
normalizationContext: ['groups' => ['book:read']],
360360
denormalizationContext: ['groups' => ['book:write']],
361361
collectionOperations: [
@@ -371,7 +371,7 @@ class Book
371371
{
372372
// ...
373373

374-
#[ApiProperty(iri: 'http://schema.org/contentUrl')]
374+
#[ApiProperty(iri: 'https://schema.org/contentUrl')]
375375
#[Groups(['book:read'])]
376376
public ?string $contentUrl = null;
377377

core/getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ use Symfony\Component\Validator\Constraints as Assert;
113113
*
114114
*/
115115
#[ORM\Entity]
116-
#[ApiResource(iri: 'http://schema.org/Offer')]
116+
#[ApiResource(iri: 'https://schema.org/Offer')]
117117
class Offer
118118
{
119119
#[ORM\Id, ORM\Column, ORM\GeneratedValue]
@@ -175,7 +175,7 @@ resources:
175175
App\Entity\Offer:
176176
shortName: 'Offer' # optional
177177
description: 'An offer from my shop' # optional
178-
iri: 'http://schema.org/Offer' # optional
178+
iri: 'https://schema.org/Offer' # optional
179179
attributes: # optional
180180
pagination_items_per_page: 25 # optional
181181
```
@@ -193,7 +193,7 @@ resources:
193193
class="App\Entity\Offer"
194194
shortName="Offer" <!-- optional -->
195195
description="An offer from my shop" <!-- optional -->
196-
iri="http://schema.org/Offer" <!-- optional -->
196+
iri="https://schema.org/Offer" <!-- optional -->
197197
/>
198198
</resources>
199199
```

core/graphql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1773,7 +1773,7 @@ use Vich\UploaderBundle\Mapping\Annotation as Vich;
17731773
*/
17741774
#[ORM\Entity]
17751775
#[ApiResource(
1776-
iri: 'http://schema.org/MediaObject',
1776+
iri: 'https://schema.org/MediaObject',
17771777
normalizationContext: [
17781778
'groups' => ['media_object_read']
17791779
],
@@ -1792,7 +1792,7 @@ class MediaObject
17921792
#[ORM\Id, ORM\Column, ORM\GeneratedValue]
17931793
protected ?int $id = null;
17941794
1795-
#[ApiProperty(iri: 'http://schema.org/contentUrl')]
1795+
#[ApiProperty(iri: 'https://schema.org/contentUrl')]
17961796
#[Groups(['media_object_read'])]
17971797
public ?string $contentUrl = null;
17981798

core/mongodb.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ use Symfony\Component\Validator\Constraints as Assert;
170170
/**
171171
* @ODM\Document
172172
*/
173-
#[ApiResource(iri: "http://schema.org/Offer")]
173+
#[ApiResource(iri: "https://schema.org/Offer")]
174174
class Offer
175175
{
176176
/**
@@ -203,7 +203,7 @@ class Offer
203203
}
204204
```
205205

206-
When defining references, always use the id for storing them instead of the native [DBRef](https://docs.mongodb.com/manual/reference/database-references/#dbrefs).
206+
When defining references, always use the ID for storing them instead of the native [DBRef](https://docs.mongodb.com/manual/reference/database-references/#dbrefs).
207207
It allows API Platform to manage [filtering on nested properties](filters.md#apifilter-annotation) by using [lookups](https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/).
208208

209209
## Filtering

core/pagination.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ is returned. It's a valid JSON(-LD) document containing items of the requested p
2020
"hydra:member": [
2121
{
2222
"@id": "/books/1",
23-
"@type": "http://schema.org/Book",
23+
"@type": "https://schema.org/Book",
2424
"name": "My awesome book"
2525
},
2626
{

0 commit comments

Comments
 (0)