Skip to content

Complain when adding conflicting identified resources #19

@Julian

Description

@Julian

Either by default or when using a stricter wrapper object, we should have a way to complain if a resource is being added in a conflicting way -- i.e. if two different resources have the same URI.

So:

registry.with_resource("http://example.com", Resource.opaque(12))
registry.with_resource("http://example.com", Resource.opaque("foo"))

should raise some conflicting resource error.

The same should happen when calling registry.combine on multiple registries -- though here we should be careful because downstream (e.g. in jsonschema) a use of combining registries is to add "known" schemas to some additional ones, and sometimes the combining is to allow users to override schemas for whatever purpose. Perhaps we could explicitly force such registries to first drop the known resources before combining.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions