I created a custom entity type using drush generate entity:content
. I chose to have bundles, and I added a bundle test_bundle
.
I can add my custom entities at admin/content
as expected.
However, when I access the entity type via JSON:API, I'm get an error:
"errors": [
{
"title": "Internal Server Error",
"status": "500",
"detail": "Route \u0022jsonapi.log_json--test_type.collection\u0022 does not exist.",
"links": {
"via": {
"href": "https://example.ddev.site/jsonapi"
},
"info": {
"href": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.1"
}
}
}
I tried deleting the entity bundle and creating a new entity bundle and I get the same error with the name of the new bundle.
I also tried deleting all bundles, in which case I get this error:
"detail": "Route \u0022jsonapi.log_json_type--log_json_type.collection\u0022 does not exist.",
How do I fix this? I've created other custom entities with drush and I haven't had this problem accessing them via JSON:API before.