You are here

protected function JsonApiGenerator::jsonApiPathHasRelated in OpenAPI 8

Checks if a JSON API Path has {related}.

@todo remove once https://www.drupal.org/project/jsonapi/issues/2953346 is done on JSON API Project.

Parameters

string $path: The path.

Return value

bool TRUE if path contains {related}, FALSE otherwise

1 call to JsonApiGenerator::jsonApiPathHasRelated()
JsonApiGenerator::getMethodParameters in src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php
Get the parameters array for a method on a route.

File

src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php, line 916

Class

JsonApiGenerator
Defines an OpenApi Schema Generator for the JsonApi module.

Namespace

Drupal\openapi\Plugin\openapi\OpenApiGenerator

Code

protected function jsonApiPathHasRelated($path) {
  return strpos($path, '{related}') !== FALSE;
}