referencing icon indicating copy to clipboard operation
referencing copied to clipboard

Consider providing `retrieve` functions with an enclosing specification

Open Julian opened this issue 2 years ago • 0 comments

Sometimes one wants to retrieve a resource but default to the specification of the document it is contained within.

In other words, to call Resource.from_contents(..., default_specification=enclosing_specification) from within a retrieval function.

This isn't completely trivial to implement however, because users can call .get_or_retrieve(uri) directly, meaning the argument would have to exist there too. Additionally, resources can be root resources of course, so enclosing_specification would anyways potentially be None for such cases.

Julian avatar Aug 07 '23 07:08 Julian