Skip to content

docs: replace http://schema.org by https://schema.org #1576

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions admin/handling-relations.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ For instance, if your API returns:
"hydra:member": [
{
"@id": "/books/07b90597-542e-480b-a6bf-5db223c761aa",
"@type": "http://schema.org/Book",
"@type": "https://schema.org/Book",
"title": "War and Peace",
"author": {
"@id": "/authors/d7a133c1-689f-4083-8cfc-afa6d867f37d",
"@type": "http://schema.org/Author",
"@type": "https://schema.org/Author",
"firstName": "Leo",
"lastName": "Tolstoi"
}
Expand Down
2 changes: 1 addition & 1 deletion admin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You can **customize everything** by using provided React Admin and [Material UI]
* Automatically generates an admin interface for all the resources of the API thanks to hypermedia features of Hydra
* Generates 'list', 'create', 'show', and 'edit' screens, as well as a delete button
* Generates suitable inputs and fields according to the API doc (e.g. number HTML input for numbers, checkbox for booleans, selectbox for relationships...)
* Generates suitable inputs and fields according to Schema.org types if available (e.g. email field for `http://schema.org/email`)
* Generates suitable inputs and fields according to Schema.org types if available (e.g. email field for `https://schema.org/email`)
* Handles relationships
* Supports pagination
* Supports filters and ordering
Expand Down
10 changes: 5 additions & 5 deletions admin/schema.org.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ The following examples will use [API Platform Core](../core/) to create such API
By default, IRIs of related objects are displayed in lists and forms.
However, it is often more user-friendly to display a string representation of the resource (such as its name) instead of its ID.

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:
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:

```php
// api/src/Entity/Person.php

#[ApiProperty(iri: "http://schema.org/name")]
#[ApiProperty(iri: "https://schema.org/name")]
private $name;
```

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

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

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

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))!
4 changes: 2 additions & 2 deletions core/extending-jsonld-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;

#[ApiResource(iri: "http://schema.org/Book")]
#[ApiResource(iri: "https://schema.org/Book")]
class Book
{
// ...

#[ApiProperty(
iri: "http://schema.org/name",
iri: "https://schema.org/name",
attributes: [
"jsonld_context" => [
"@id" => "http://yourcustomid.com",
Expand Down
32 changes: 16 additions & 16 deletions core/external-vocabularies.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;

#[ApiResource(iri: "http://schema.org/Book")]
#[ApiResource(iri: "https://schema.org/Book")]
class Book
{
// ...

#[ApiProperty(iri: "http://schema.org/name")]
#[ApiProperty(iri: "https://schema.org/name")]
public $name;

// ...
Expand Down Expand Up @@ -58,17 +58,17 @@ Built-in mapping is:

Constraints | Schema.org type |
---------------------------------------------------- |-----------------------------------|
`Symfony\Component\Validator\Constraints\Url` | `http://schema.org/url` |
`Symfony\Component\Validator\Constraints\Email` | `http://schema.org/email` |
`Symfony\Component\Validator\Constraints\Uuid` | `http://schema.org/identifier` |
`Symfony\Component\Validator\Constraints\CardScheme` | `http://schema.org/identifier` |
`Symfony\Component\Validator\Constraints\Bic` | `http://schema.org/identifier` |
`Symfony\Component\Validator\Constraints\Iban` | `http://schema.org/identifier` |
`Symfony\Component\Validator\Constraints\Date` | `http://schema.org/Date` |
`Symfony\Component\Validator\Constraints\DateTime` | `http://schema.org/DateTime` |
`Symfony\Component\Validator\Constraints\Time` | `http://schema.org/Time` |
`Symfony\Component\Validator\Constraints\Image` | `http://schema.org/image` |
`Symfony\Component\Validator\Constraints\File` | `http://schema.org/MediaObject` |
`Symfony\Component\Validator\Constraints\Currency` | `http://schema.org/priceCurrency` |
`Symfony\Component\Validator\Constraints\Isbn` | `http://schema.org/isbn` |
`Symfony\Component\Validator\Constraints\Issn` | `http://schema.org/issn` |
`Symfony\Component\Validator\Constraints\Url` | `https://schema.org/url` |
`Symfony\Component\Validator\Constraints\Email` | `https://schema.org/email` |
`Symfony\Component\Validator\Constraints\Uuid` | `https://schema.org/identifier` |
`Symfony\Component\Validator\Constraints\CardScheme` | `https://schema.org/identifier` |
`Symfony\Component\Validator\Constraints\Bic` | `https://schema.org/identifier` |
`Symfony\Component\Validator\Constraints\Iban` | `https://schema.org/identifier` |
`Symfony\Component\Validator\Constraints\Date` | `https://schema.org/Date` |
`Symfony\Component\Validator\Constraints\DateTime` | `https://schema.org/DateTime` |
`Symfony\Component\Validator\Constraints\Time` | `https://schema.org/Time` |
`Symfony\Component\Validator\Constraints\Image` | `https://schema.org/image` |
`Symfony\Component\Validator\Constraints\File` | `https://schema.org/MediaObject` |
`Symfony\Component\Validator\Constraints\Currency` | `https://schema.org/priceCurrency` |
`Symfony\Component\Validator\Constraints\Isbn` | `https://schema.org/isbn` |
`Symfony\Component\Validator\Constraints\Issn` | `https://schema.org/issn` |
14 changes: 7 additions & 7 deletions core/file-upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ use Vich\UploaderBundle\Mapping\Annotation as Vich;
*/
#[ORM\Entity]
#[ApiResource(
iri: 'http://schema.org/MediaObject',
iri: 'https://schema.org/MediaObject',
normalizationContext: ['groups' => ['media_object:read']],
itemOperations: ['get'],
collectionOperations: [
Expand Down Expand Up @@ -102,7 +102,7 @@ class MediaObject
#[ORM\Id, ORM\Column, ORM\GeneratedValue]
private ?int $id = null;

#[ApiProperty(iri: 'http://schema.org/contentUrl')]
#[ApiProperty(iri: 'https://schema.org/contentUrl')]
#[Groups(['media_object:read'])]
public ?string $contentUrl = null;

Expand Down Expand Up @@ -215,7 +215,7 @@ your data, you will get a response looking like this:

```json
{
"@type": "http://schema.org/MediaObject",
"@type": "https://schema.org/MediaObject",
"@id": "/media_objects/<id>",
"contentUrl": "<url>"
}
Expand Down Expand Up @@ -253,14 +253,14 @@ use Symfony\Component\HttpFoundation\File\File;
use Vich\UploaderBundle\Mapping\Annotation as Vich;

#[ORM\Entity]
#[ApiResource(iri: 'http://schema.org/Book')]
#[ApiResource(iri: 'https://schema.org/Book')]
class Book
{
// ...

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

// ...
Expand Down Expand Up @@ -355,7 +355,7 @@ use Vich\UploaderBundle\Mapping\Annotation as Vich;
*/
#[ORM\Entity]
#[ApiResource(
iri: 'http://schema.org/Book',
iri: 'https://schema.org/Book',
normalizationContext: ['groups' => ['book:read']],
denormalizationContext: ['groups' => ['book:write']],
collectionOperations: [
Expand All @@ -371,7 +371,7 @@ class Book
{
// ...

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

Expand Down
6 changes: 3 additions & 3 deletions core/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ use Symfony\Component\Validator\Constraints as Assert;
*
*/
#[ORM\Entity]
#[ApiResource(iri: 'http://schema.org/Offer')]
#[ApiResource(iri: 'https://schema.org/Offer')]
class Offer
{
#[ORM\Id, ORM\Column, ORM\GeneratedValue]
Expand Down Expand Up @@ -175,7 +175,7 @@ resources:
App\Entity\Offer:
shortName: 'Offer' # optional
description: 'An offer from my shop' # optional
iri: 'http://schema.org/Offer' # optional
iri: 'https://schema.org/Offer' # optional
attributes: # optional
pagination_items_per_page: 25 # optional
```
Expand All @@ -193,7 +193,7 @@ resources:
class="App\Entity\Offer"
shortName="Offer" <!-- optional -->
description="An offer from my shop" <!-- optional -->
iri="http://schema.org/Offer" <!-- optional -->
iri="https://schema.org/Offer" <!-- optional -->
/>
</resources>
```
Expand Down
4 changes: 2 additions & 2 deletions core/graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -1773,7 +1773,7 @@ use Vich\UploaderBundle\Mapping\Annotation as Vich;
*/
#[ORM\Entity]
#[ApiResource(
iri: 'http://schema.org/MediaObject',
iri: 'https://schema.org/MediaObject',
normalizationContext: [
'groups' => ['media_object_read']
],
Expand All @@ -1792,7 +1792,7 @@ class MediaObject
#[ORM\Id, ORM\Column, ORM\GeneratedValue]
protected ?int $id = null;

#[ApiProperty(iri: 'http://schema.org/contentUrl')]
#[ApiProperty(iri: 'https://schema.org/contentUrl')]
#[Groups(['media_object_read'])]
public ?string $contentUrl = null;

Expand Down
4 changes: 2 additions & 2 deletions core/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ use Symfony\Component\Validator\Constraints as Assert;
/**
* @ODM\Document
*/
#[ApiResource(iri: "http://schema.org/Offer")]
#[ApiResource(iri: "https://schema.org/Offer")]
class Offer
{
/**
Expand Down Expand Up @@ -203,7 +203,7 @@ class Offer
}
```

When defining references, always use the id for storing them instead of the native [DBRef](https://docs.mongodb.com/manual/reference/database-references/#dbrefs).
When defining references, always use the ID for storing them instead of the native [DBRef](https://docs.mongodb.com/manual/reference/database-references/#dbrefs).
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/).

## Filtering
Expand Down
2 changes: 1 addition & 1 deletion core/pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ is returned. It's a valid JSON(-LD) document containing items of the requested p
"hydra:member": [
{
"@id": "/books/1",
"@type": "http://schema.org/Book",
"@type": "https://schema.org/Book",
"name": "My awesome book"
},
{
Expand Down
6 changes: 3 additions & 3 deletions core/serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ In the above example, you will receive the book's data like this:
{
"@context": "/contexts/Book",
"@id": "/books/3",
"@type": "http://schema.org/Book",
"@type": "https://schema.org/Book",
"publicationDate": "1989-06-16"
}
```
Expand Down Expand Up @@ -1074,8 +1074,8 @@ The JSON output will now include the embedded context:
"@context": {
"@vocab": "http://localhost:8000/apidoc#",
"hydra": "http://www.w3.org/ns/hydra/core#",
"name": "http://schema.org/name",
"author": "http://schema.org/author"
"name": "https://schema.org/name",
"author": "https://schema.org/author"
},
"@id": "/books/62",
"@type": "Book",
Expand Down
4 changes: 2 additions & 2 deletions core/url-generation-strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For instance, in JSON-LD, you will get a collection like this:
"hydra:member": [
{
"@id": "/books/1",
"@type": "http://schema.org/Book",
"@type": "https://schema.org/Book",
"name": "My awesome book"
}
],
Expand Down Expand Up @@ -83,7 +83,7 @@ For the above configuration, the collection will be like this:
"hydra:member": [
{
"@id": "http://example.com/books/1",
"@type": "http://schema.org/Book",
"@type": "https://schema.org/Book",
"name": "My awesome book"
}
],
Expand Down
28 changes: 14 additions & 14 deletions core/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -535,20 +535,20 @@ The following validation constraints are covered:

Constraints | Vocabulary |
--------------------------------------------------------------------------------------|-----------------------------------|
[`Url`](https://symfony.com/doc/current/reference/constraints/Url.html) | `http://schema.org/url` |
[`Email`](https://symfony.com/doc/current/reference/constraints/Email.html) | `http://schema.org/email` |
[`Uuid`](https://symfony.com/doc/current/reference/constraints/Uuid.html) | `http://schema.org/identifier` |
[`CardScheme`](https://symfony.com/doc/current/reference/constraints/CardScheme.html) | `http://schema.org/identifier` |
[`Bic`](https://symfony.com/doc/current/reference/constraints/Bic.html) | `http://schema.org/identifier` |
[`Iban`](https://symfony.com/doc/current/reference/constraints/Iban.html) | `http://schema.org/identifier` |
[`Date`](https://symfony.com/doc/current/reference/constraints/Date.html) | `http://schema.org/Date` |
[`DateTime`](https://symfony.com/doc/current/reference/constraints/DateTime.html) | `http://schema.org/DateTime` |
[`Time`](https://symfony.com/doc/current/reference/constraints/Time.html) | `http://schema.org/Time` |
[`Image`](https://symfony.com/doc/current/reference/constraints/Image.html) | `http://schema.org/image` |
[`File`](https://symfony.com/doc/current/reference/constraints/File.html) | `http://schema.org/MediaObject` |
[`Currency`](https://symfony.com/doc/current/reference/constraints/Currency.html) | `http://schema.org/priceCurrency` |
[`Isbn`](https://symfony.com/doc/current/reference/constraints/Isbn.html) | `http://schema.org/isbn` |
[`Issn`](https://symfony.com/doc/current/reference/constraints/Issn.html) | `http://schema.org/issn` |
[`Url`](https://symfony.com/doc/current/reference/constraints/Url.html) | `https://schema.org/url` |
[`Email`](https://symfony.com/doc/current/reference/constraints/Email.html) | `https://schema.org/email` |
[`Uuid`](https://symfony.com/doc/current/reference/constraints/Uuid.html) | `https://schema.org/identifier` |
[`CardScheme`](https://symfony.com/doc/current/reference/constraints/CardScheme.html) | `https://schema.org/identifier` |
[`Bic`](https://symfony.com/doc/current/reference/constraints/Bic.html) | `https://schema.org/identifier` |
[`Iban`](https://symfony.com/doc/current/reference/constraints/Iban.html) | `https://schema.org/identifier` |
[`Date`](https://symfony.com/doc/current/reference/constraints/Date.html) | `https://schema.org/Date` |
[`DateTime`](https://symfony.com/doc/current/reference/constraints/DateTime.html) | `https://schema.org/DateTime` |
[`Time`](https://symfony.com/doc/current/reference/constraints/Time.html) | `https://schema.org/Time` |
[`Image`](https://symfony.com/doc/current/reference/constraints/Image.html) | `https://schema.org/image` |
[`File`](https://symfony.com/doc/current/reference/constraints/File.html) | `https://schema.org/MediaObject` |
[`Currency`](https://symfony.com/doc/current/reference/constraints/Currency.html) | `https://schema.org/priceCurrency` |
[`Isbn`](https://symfony.com/doc/current/reference/constraints/Isbn.html) | `https://schema.org/isbn` |
[`Issn`](https://symfony.com/doc/current/reference/constraints/Issn.html) | `https://schema.org/issn` |

## Specification property restrictions

Expand Down
4 changes: 2 additions & 2 deletions extra/philosophy.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In 25 years of PHP, the web changed dramatically and is now evolving faster than
[full-JavaScript Progressive Web Apps](https://en.wikipedia.org/wiki/Progressive_web_application) **are becoming the standard**.
* [Internet users spend more time on their mobile devices than on desktops](https://www.broadbandsearch.net/blog/mobile-desktop-internet-usage-statistics): having a mobile-first website is mandatory and **native mobile apps are a must-have**.
* [The semantic web](https://en.wikipedia.org/wiki/Semantic_Web) and **especially [Linked Data](https://en.wikipedia.org/wiki/Linked_data)
is a reality**: with the [Schema.org](http://schema.org/) initiative and new open web standards such as [JSON-LD](http://json-ld.org/),
is a reality**: with the [Schema.org](https://schema.org/) initiative and new open web standards such as [JSON-LD](http://json-ld.org/),
search engines (among a bunch of other services and software) consume structured and machine-readable data at web scale.
Not exposing such data decrease interoperability and search engine ranking/efficiency (think rich snippets).
* HTTP/2 and HTTP/3 [dramatically improve the performance of web applications](https://vulcain.rocks) thanks to multiplexing, Server Push and their other new capabilities.
Expand All @@ -29,7 +29,7 @@ API Platform makes modern development easy and fun again:
be understood by any compliant client such as your apps but also search engines (JSON-LD with Schema.org vocabulary).
This API is the central and unique entry point to access and modify data. It also encapsulates the whole business logic.
* [Then **create as many clients as you want using frontend technologies you love**](../client-generator/index.md): a JavaScript
webapp built in React or in Vue querying the API but also a native iOS or Android app, or even a desktop application. Clients
webapp built with React or with Vue querying the API but also a native iOS or Android app, or even a desktop application. Clients
only display data and forms.

See also [the general design](../core/design.md) of the framework.
8 changes: 4 additions & 4 deletions schema-generator/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ use Doctrine\ORM\Mapping as ORM;
/**
* A person (alive, dead, undead, or fictional).
*
* @see http://schema.org/Person Documentation on Schema.org
* @see https://schema.org/Person Documentation on Schema.org
*
* @Iri("http://schema.org/Person")
* @Iri("https://schema.org/Person")
*/
#[ORM\Entity]
#[UniqueEntity('email')]
Expand Down Expand Up @@ -331,7 +331,7 @@ class Product
/**
* the weight of the product or person
*
* @see http://schema.org/weight
* @see https://schema.org/weight
*
*/
#[ORM\Embedded(class: QuantitativeValue::class, columnPrefix: 'weight_')]
Expand Down Expand Up @@ -560,7 +560,7 @@ config:
format: null # Example: rdfxml

# Namespace of the vocabulary to import
vocabularyNamespace: 'http://schema.org/' # Example: 'http://www.w3.org/ns/activitystreams#'
vocabularyNamespace: 'https://schema.org/' # Example: 'http://www.w3.org/ns/activitystreams#'

# OWL relation files containing cardinality information in the GoodRelations format
relations: # Example: 'https://purl.org/goodrelations/v1.owl'
Expand Down
Loading