- πΊπΈUnited States bradjones1 Digital Nomad Life
Marking this active as the newly-opened majors of openapi and this module will target OpenAPI 3.x.
No longer PP.
Hi,
not sure if this problem with Cross Bundles itself, or OpenApi, but at least it's compability problem between the two. Reporting this at least in case someone comes up with ideas/reason why this happens, or if I or someone else can come up with solution on which side and now to fix this.
Background/reason:
As usual, people usually use many outside modules with JSON:API, like OpenAPI for generating schema, cross bundles to go around JSON:API's limitations for real world uses. So one very commonly used module is OpenAPI for generating API schema.
However, when enabling cross bundles, schema generation in OpenAPI dies with error
Error: Call to a member function getFieldStorageDefinition() on null in Drupal\openapi\Plugin\openapi\OpenApiGenerator\JsonApiGenerator->isToManyRelationship() (line 984 of modules/contrib/openapi/src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php).
Strong guess is, is that OpenAPI dies to endpoint created by Cross bundles.
Easy example here is media. Usually you want to create many media types with random fields, like Image, PDF, Video and whatever, which is extremely useful use case for Cross bundles to list all medias regardless of its type from /jsonapi/media
So to reproduce this, install OpenAPI module, create couple media types with fields, and check for generated schema in URL /openapi/jsonapi?_format=json - works beautifully. Enable cross-bundles, and it breaks.
I know neither project really has a "stable" release yet, but reporting this here as a starting point for looking for reason :)
Active
4.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Marking this active as the newly-opened majors of openapi and this module will target OpenAPI 3.x.
No longer PP.