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
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Screenshot_20250123_155625.png | 169.95 KB | dlevchik |
Comments
Comment #2
broonWe 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.
Comment #3
dlevchik commentedCould 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