Skip to content

Conversation

@soyuka
Copy link
Member

@soyuka soyuka commented Feb 8, 2026

When hydra_prefix is not set to true, owl:onProperty uses bare "member"
which jsonld.expand resolves via @vocab (e.g. "http://localhost/docs.jsonld#member")
instead of "http://www.w3.org/ns/hydra/core#member". This caused Strategy 1
in findRelatedClass to fail. For read-only resources without a POST operation,
Strategy 2 also fails, resulting in "Cannot find the class related to..." errors.

Relax the onProperty check from exact match to endsWith("#member") so both
the correct hydra IRI and the @vocab-expanded IRI are accepted.

Closes #147

  When hydra_prefix is not set to true, owl:onProperty uses bare "member"
  which jsonld.expand resolves via @vocab (e.g. "http://localhost/docs.jsonld#member")
  instead of "http://www.w3.org/ns/hydra/core#member". This caused Strategy 1
  in findRelatedClass to fail. For read-only resources without a POST operation,
  Strategy 2 also fails, resulting in "Cannot find the class related to..." errors.

  Relax the onProperty check from exact match to endsWith("#member") so both
  the correct hydra IRI and the @vocab-expanded IRI are accepted.

  Closes api-platform#147
@soyuka soyuka merged commit 332bfc7 into api-platform:main Feb 8, 2026
3 checks passed
@soyuka soyuka deleted the fix/147 branch February 8, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error parsing read-only resource

1 participant