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

CMR-10242: Fix /items/ path for collections which have granule metadata #372

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

doug-newman-nasa
Copy link
Contributor

The /items path was missing from rel=items links belonging to collections who have granule metadata in CMR. This resolves that problem. Needs to be addressed before the next release to UAT.

@eudoroolivares2016 eudoroolivares2016 changed the title Cmr 10221 fix CMR-10221: Fix /items/ path for collections which have granule metadata Nov 5, 2024
@@ -24,7 +24,7 @@ describe("addItemLinkIfPresent", () => {

const numberoOfLinks = stacCollection.links.length;
// Invoke method
addItemLinkIfPresent(stacCollection, "https://foo.com/items");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were talking about this on slack and I'm not sure I understand. Is it the case that this part of the url 'items' is going to be in the actual metadata and thus if we append it going to cause a problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case of CMR collections with granules, the metadata will not contain a URL for the items endpoint, it is inferred and generated in code. CMR collections without granules and a STAC related url will have their link pulled from metadata.

@eudoroolivares2016 eudoroolivares2016 changed the title CMR-10221: Fix /items/ path for collections which have granule metadata CMR-10242: Fix /items/ path for collections which have granule metadata Nov 6, 2024
@eudoroolivares2016 eudoroolivares2016 merged commit 82d4a9b into nasa:master Nov 6, 2024
5 checks passed
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.

3 participants