Skip to content

Do not allow having both "id" and "@id" / type" and "@type" in Thing#76

Merged
progval merged 4 commits into
codemeta:masterfrom
bact:not-both-id-type-in-thing
Oct 7, 2025
Merged

Do not allow having both "id" and "@id" / type" and "@type" in Thing#76
progval merged 4 commits into
codemeta:masterfrom
bact:not-both-id-type-in-thing

Conversation

@bact

@bact bact commented Oct 7, 2025

Copy link
Copy Markdown
Contributor

Add validation for Thing to errors on having both "id" and "@id" / "type" and "@type".

Cypress tests added.

Should we also check for codemeta:type? As it is mentioned here:

return doc["type"] || doc["@type"] || doc["codemeta:type"]

bact added 2 commits October 7, 2025 15:47
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@progval

progval commented Oct 7, 2025

Copy link
Copy Markdown
Member

codemeta:type is not valid. I don't know why I added support for it.

@bact

bact commented Oct 7, 2025

Copy link
Copy Markdown
Contributor Author

codemeta:type is not valid. I don't know why I added support for it.

Do you like me to remove it in this PR?

@progval

progval commented Oct 7, 2025

Copy link
Copy Markdown
Member

It can be a separate PR

@bact bact mentioned this pull request Oct 7, 2025
@bact

bact commented Oct 7, 2025

Copy link
Copy Markdown
Contributor Author

It can be a separate PR

Created as #77

@progval progval force-pushed the not-both-id-type-in-thing branch from cfe03df to f1b8b96 Compare October 7, 2025 18:28
@progval progval merged commit d736a36 into codemeta:master Oct 7, 2025
1 check passed
@bact bact deleted the not-both-id-type-in-thing branch October 7, 2025 18:51
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.

2 participants