Support non-entity bundle types

Created on 1 October 2019, almost 5 years ago
Updated 6 August 2024, about 2 months ago

Hi everybody,

We are using JSON:API on Drupal core 8.7.7 with Drupal Commerce 8.x-2.14 and we installed the OpenAPI and Swagger UI for OpenAPI UI for documentation and when we try to generate documentation on "/admin/config/services/openapi/swagger/jsonapi" we are getting this error:

Error: Call to a member function getTypeName() on null in Drupal\schemata_json_schema\Normalizer\jsonapi\SchemataSchemaNormalizer->normalize() (line 63 of modules/contrib/schemata/schemata_json_schema/src/Normalizer/jsonapi/SchemataSchemaNormalizer.php).
Drupal\schemata_json_schema\Normalizer\jsonapi\SchemataSchemaNormalizer->normalize(Object, 'schema_json:api_json', Array) (Line: 35)
Drupal\jsonapi_extras\Normalizer\SchemataSchemaNormalizer->normalize(Object, 'schema_json:api_json', Array) (Line: 143)
Symfony\Component\Serializer\Serializer->normalize(Object, 'schema_json:api_json') (Line: 383)
Drupal\openapi\Plugin\openapi\OpenApiGeneratorBase->getJsonSchema('api_json', 'commerce_payment_method') (Line: 716)
Drupal\openapi\Plugin\openapi\OpenApiGenerator\JsonApiGenerator->getDefinitions() (Line: 554)
Drupal\openapi\Plugin\openapi\OpenApiGeneratorBase->definitionExists('block_content--accordion') (Line: 517)
Drupal\openapi\Plugin\openapi\OpenApiGeneratorBase->getDefinitionReference('block_content', 'accordion') (Line: 774)
Drupal\openapi\Plugin\openapi\OpenApiGenerator\JsonApiGenerator->getTags() (Line: 209)
Drupal\openapi\Plugin\openapi\OpenApiGeneratorBase->getSpecification() (Line: 46)
Drupal\openapi\Controller\OpenApiUiController->generate(Object, Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Regards,
Marco

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇵🇹Portugal msantos202

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024