openspending/fiscal-data-package

Which attribute is the ID for a resource?

Closed this issue · 1 comments

In a couple of places we have references such as:

OPTIONAL: the resource in which the field is located.
// Defaults to the first resource in the resources array

It is unclear which property of the resources[] element is being referred to. Implicitly, I think it's probably:

  • name, if there is one
  • otherwise, path

But maybe it's always name. (in other words, a resource must have a name if you want to be able to refer to it in the model).

Thoughts?

@stevage yes I assume that a resource MUST have a name if it is to be referred to elsewhere.