Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning about missing self links #76

Closed
gadomski opened this issue Mar 3, 2022 · 3 comments
Closed

Warning about missing self links #76

gadomski opened this issue Mar 3, 2022 · 3 comments

Comments

@gadomski
Copy link
Member

gadomski commented Mar 3, 2022

While the spec says self links are strongly recommended (e.g. from the item-spec),

Screen Shot 2022-03-03 at 5 21 26 AM

the best practices have multiple locations where a self link is not recommended for all objects in a tree. E.g. in Self-contained:

Only relative href's in structural links ... This also implies no self link, as that link must be absolute.

And Relative published:

This is designed so that a self-contained catalog (of either type, with its assets or just metadata) can be 'published' online by just adding one field (the self link) to its root (Catalog or Collection).

IMO currently warning every time a self link is missing is a false positive, and the warning should either be dropped or put-behind an opt-in flag. I also think this could/should also be opened an issue in stac-spec itself.

@jonhealy1
Copy link
Collaborator

Maybe a WARNING isn't always necessary for something that may just be a 'recommendation' too?

@jonhealy1
Copy link
Collaborator

jonhealy1 commented Mar 4, 2022

@gadomski Do you think I should remove this check entirely? Making it conditional on different types of collections is an option maybe, but I don't know if it's achievable? What do you think?

@philvarner
Copy link
Collaborator

in stac-api-validator, I feel like there are some things that are currently warnings that are more like "are you sure you meant to do this?" -- for example, when datetime values that are not RFC 3339-compliant are accepted.

I wouldn't remove it entirely.

I think you can probably come up with a good heuristic.

The other option is having the ability to turn off specific checks link most linters do, so an implementer who intentionally didn't have self links could explicitly turn that warning off.

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

No branches or pull requests

3 participants