You are here

protected function JsonApiGenerator::jsonApiPathHasRelated in OpenAPI for JSON:API 3.x

Same name and namespace in other branches
  1. 8.2 src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php \Drupal\openapi_jsonapi\Plugin\openapi\OpenApiGenerator\JsonApiGenerator::jsonApiPathHasRelated()

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 963

Class

JsonApiGenerator
Defines an OpenApi Schema Generator for the JsonApi module.

Namespace

Drupal\openapi_jsonapi\Plugin\openapi\OpenApiGenerator

Code

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