When a content type is renamed, entity references to that content type are still described in the schema using the original name.

For example, in the Contenta default install, "node--recipe" is renamed to "recipes". But the Article content type has a "recipes" entity reference that is described in the schema (viewed via /openapi/jsonapi) as:

 "type": {
   "type": "string",
    "title": "Referenced resource",
    "enum": [
       "node--recipe"
    ]
}

I think "node--recipe" should be replaced in the above example with "recipes".

Comments

ef4 created an issue. See original summary.

e0ipso’s picture

This issue is probably a bug in the JSON API integration in the Schemata module. It is probably missing the translation to the internal name (\Drupal::service('jsonapi.resource_type.repository')->get($entity_type_id, $bundle)->getPublicName($field_name)).

e0ipso’s picture

Status: Active » Closed (outdated)

This was fixed elsewhere.