Support OpenAPI JSONAPI

Created on 14 January 2025, 3 months ago

Problem/Motivation

Steps to reproduce

- Create a fields using dynamic_entity_reference
- Install OpenAPI_JsonAPI and OpenAPI_ui_Swagger
- Go to the admin/config/services/openapi/swagger/jsonapi
```
Error: Call to a member function getEntityTypeId() on bool in Drupal\openapi_jsonapi\Plugin\openapi\OpenApiGenerator\JsonApiGenerator->getRouteMethodSummary() (line 303 of modules/contrib/openapi_jsonapi/src/Plugin/openapi/OpenApiGenerator/JsonApiGenerator.php).
```

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs work

Version

4.0

Component

Code

Created by

🇮🇳India j2r

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

Comments & Activities

  • Issue created by @j2r
  • 🇩🇪Germany broon Potsdam

    We also noticed that openapi.json does not contain enum values for the allowed entity types and bundles.

    "properties.data.items.properties.type.enum" should be set and contain the list of allowed reference types, ie. "node--my-first-bundle", "node--my-second-bundle", "taxonomy_term--my-vocabulary" and so on.

  • 🇵🇱Poland dlevchik Poznan, Poland

    Could not reproduce. On Drupal core 10.4.1, openapi_jsonapi 3.05, openapi_ui_swagger 1.1.0

    Installed the modules, enabled everything
    Added dynamic entity reference to article
    No error on openapi_ui_swagger

    Could you add more details here? Also, it looks like this is more of a openapi_ui_swagger issue than dynamic_entity_reference

Production build 0.71.5 2024