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

feat: Add Fields impl for Link #542

Merged
merged 6 commits into from
Dec 3, 2024

Conversation

alekzvik
Copy link
Contributor

@alekzvik alekzvik commented Dec 3, 2024

Closes

Description

Add implementation of Field trait for Link.

Checklist

Delete any checklist items that do not apply (e.g. if your change is minor, it may not require documentation updates).

  • Unit tests
  • Documentation, including doctests
  • Git history is linear
  • Commit messages are descriptive
  • (optional) Git commit messages follow conventional commits
  • Code is formatted (cargo fmt)
  • cargo test
  • Changes are added to the CHANGELOG

@alekzvik alekzvik force-pushed the feat-fields-for-link branch from c21abf9 to b0c429b Compare December 3, 2024 14:36
@alekzvik
Copy link
Contributor Author

alekzvik commented Dec 3, 2024

Disclaimer:
I am new to rust, so I picked an issue and tried to do it.
Please let me know if something can be improved.

@gadomski gadomski linked an issue Dec 3, 2024 that may be closed by this pull request
@gadomski gadomski self-requested a review December 3, 2024 15:17
Copy link
Member

@gadomski gadomski left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for the contribution! As of #507, I think we could just #[derive(Fields)] on the Links structure, rather than manually implementing it. See

#[derive(Debug, Serialize, Deserialize, PartialEq, Clone, SelfHref, Links, Fields)]
for an example.

crates/types/src/link.rs Outdated Show resolved Hide resolved
@alekzvik
Copy link
Contributor Author

alekzvik commented Dec 3, 2024

The code is ready.

I am a bit lost with the CHANGELOG.md though. The change I made is in the stac_types crate. Do we need a separate CHANGELOG.md for it? If yes, did you use any tool to generate the first version?

Currently, the change is reflected in the core crate CHANGELOG.

@gadomski
Copy link
Member

gadomski commented Dec 3, 2024

I am a bit lost with the CHANGELOG.md though. The change I made is in the stac_types crate. Do we need a separate CHANGELOG.md for it? If yes, did you use any tool to generate the first version?

Yeah, stac-types is new, and I think won't be used by most folks. We re-export it in stac so it's fine to update the changelog there, thanks!

@gadomski gadomski merged commit 2b97d76 into stac-utils:main Dec 3, 2024
16 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.

Implement Fields for Link
2 participants