You are here

public function UrlLinkEnhancer::getOutputJsonSchema in JSON:API Extras 8.3

Get the JSON Schema for the new output.

Return value

array An structured array representing the JSON Schema of the new output.

Overrides ResourceFieldEnhancerInterface::getOutputJsonSchema

File

src/Plugin/jsonapi/FieldEnhancer/UrlLinkEnhancer.php, line 139

Class

UrlLinkEnhancer
Add URL aliases to links.

Namespace

Drupal\jsonapi_extras\Plugin\jsonapi\FieldEnhancer

Code

public function getOutputJsonSchema() {
  return [
    'type' => 'object',
    'properties' => [
      'uri' => [
        'type' => 'string',
      ],
      'title' => [
        'type' => 'string',
      ],
      'options' => [
        'type' => 'array',
      ],
      'url' => [
        'type' => 'string',
      ],
    ],
  ];
}