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

Schema for non empty collections #717

Closed
987Nabil opened this issue Aug 3, 2024 · 10 comments · Fixed by #723
Closed

Schema for non empty collections #717

987Nabil opened this issue Aug 3, 2024 · 10 comments · Fixed by #723

Comments

@987Nabil
Copy link
Contributor

987Nabil commented Aug 3, 2024

We should support some kind of non empty collections.
Either

  1. we create a new sub type of Collection that takes care of the validation on construction
  2. we have a method def nonEmptyChunk[A :Schema]: Schema[NonEmptyChunk[A]] that uses transform to validate the non-emptiness on construction
@jdegoes
Copy link
Member

jdegoes commented Aug 5, 2024

/bounty $250

Copy link

algora-pbc bot commented Aug 5, 2024

💎 $250 bounty • ZIO

Steps to solve:

  1. Start working: Comment /attempt #717 with your implementation plan
  2. Submit work: Create a pull request including /claim #717 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to zio/zio-schema!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟡 @nikolaiser Aug 6, 2024, 1:36:04 PM WIP
🟢 @palak2002 Aug 11, 2024, 2:41:07 PM WIP
🟢 @987Nabil #723

@nikolaiser
Copy link

nikolaiser commented Aug 6, 2024

/attempt #717

Copy link

algora-pbc bot commented Aug 7, 2024

💡 @987Nabil submitted a pull request that claims the bounty. You can visit your bounty board to reward.

987Nabil added a commit to 987Nabil/zio-schema that referenced this issue Aug 7, 2024
987Nabil added a commit to 987Nabil/zio-schema that referenced this issue Aug 10, 2024
987Nabil added a commit to 987Nabil/zio-schema that referenced this issue Aug 10, 2024
987Nabil added a commit to 987Nabil/zio-schema that referenced this issue Aug 10, 2024
@palak2002
Copy link

palak2002 commented Aug 11, 2024

💎 $250 bounty • ZIO

Steps to solve:

  1. Start working: Comment /attempt #717 with your implementation plan
  2. Submit work: Create a pull request including /claim #717 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to zio/zio-schema!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @nikolaiser Aug 6, 2024, 1:36:04 PM #722
🟢 @987Nabil #723

/attempt #717
I plan to implement non-empty collections by creating a new subtype of Collection that validates non-emptiness on construction . I'll start by defining the NonEmptyCollection type and then create a corresponding Schema that enforces this validation.

Copy link

algora-pbc bot commented Aug 11, 2024

Note

The user @nikolaiser is already attempting to complete issue #717 and claim the bounty. We recommend checking in on @nikolaiser's progress, and potentially collaborating, before starting a new solution.

@palak2002
Copy link

💎 $250 bounty • ZIO

Steps to solve:

  1. Start working: Comment /attempt #717 with your implementation plan
  2. Submit work: Create a pull request including /claim #717 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to zio/zio-schema!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @nikolaiser Aug 6, 2024, 1:36:04 PM #722
🟢 @987Nabil #723

/attempt #717
I plan to implement non-empty collections by creating a new subtype of Collection that validates non-emptiness on construction (Option 1). I'll start by defining the NonEmptyCollection type and then create a corresponding Schema that enforces this validation.

@987Nabil
Copy link
Contributor Author

@palak2002 this is already done in my PR and it is already approved

987Nabil added a commit to 987Nabil/zio-schema that referenced this issue Aug 12, 2024
Copy link

algora-pbc bot commented Aug 13, 2024

@nikolaiser: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

Copy link

algora-pbc bot commented Aug 14, 2024

🎉🎈 @987Nabil has been awarded $250! 🎈🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants