Using the Vocabulary

API Platform Admin has native support for the popular vocabulary. is a collaborative, community activity with a mission to create, maintain, and promote schemas for structured data on the Internet, on web pages, in email messages, and beyond.

To leverage this capability, your API must use the JSON-LD format and the appropriate types. The following examples will use API Platform Core to create such API, but keep in mind that this feature will work with any JSON-LD API using the vocabulary, regardless of the used web framework or programming language.

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

// api/src/Entity/Person.php

private $name;

Emails, URLs and Identifiers

Besides, it is also possible to use the documentation to customize some fields automatically while configuring the semantics of your data.

The following types are currently supported by API Platform Admin:

  • the field will be rendered using the <EmailField> React Admin component
  • the field will be rendered using the <UrlField> React Admin component
  • 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)!