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

refactor: always add values to constraints #1448

Merged
merged 1 commit into from
Mar 17, 2022
Merged

refactor: always add values to constraints #1448

merged 1 commit into from
Mar 17, 2022

Conversation

olav
Copy link
Contributor

@olav olav commented Mar 17, 2022

@vercel
Copy link

vercel bot commented Mar 17, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/unleash-team/unleash-docs/B2QX95J994VcZ5R6NKAhvED9kN5F
✅ Preview: https://unleash-docs-git-constraint-values-unleash-team.vercel.app

@github-actions
Copy link

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 91.36% 4907/5371
🟢 Branches 80.21% 754/940
🟢 Functions 86.58% 1148/1326
🟢 Lines 91.27% 4799/5258

Test suite run success

824 tests passing in 118 suites.

Report generated by 🧪jest coverage report action from 5b86045

Copy link
Contributor

@FredrikOseberg FredrikOseberg left a comment

Choose a reason for hiding this comment

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

Nice. I think we need to remove the min values from the constraint values schema though, because now that it can be an empty array we will include it in the response to the frontend. So create will work, because we don't pass the empty array on create - but when you edit you'll receive the empty array in the response from the backend and the validation will fail because of the minimum 1 item hard requirement on the constraint schema.

Copy link
Contributor

@FredrikOseberg FredrikOseberg left a comment

Choose a reason for hiding this comment

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

I see you have accounted for this. LGTM!

@olav olav merged commit 1cc43c0 into main Mar 17, 2022
@olav olav deleted the constraint-values branch March 17, 2022 11:32
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.

None yet

2 participants