1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00
unleash.unleash/.github
Christopher Kolstad 6c6001619c
Feat/variant api (#1119)
Add a new .../:feature/variants API

This adds
- `GET /api/admin/projects/:projectId/features/:featureName/variants` which returns 
```json
{ version: '1', variants: IVariant[] }
```
- `PATCH /api/admin/projects/:projectId/features/:featureName/variants` which accepts a json patch set and updates the feature's variants field and then returns 
```json
{ version: '1', variants: IVariant[] }
```
- `PUT /api/admin/projects/:projectId/features/:featureName/variants`
 which accepts a IVariant[] and overwrites the current variants list for the feature defined in :featureName and returns
```json
{ version: '1', variants: IVariant[] }

- This also makes sure the total weight of all variants is == 1000
- Validates that there is at least 1 'variable' variant if there are variants
- Validates that 'fix' variants total weight can't exceed 1000
- Adds tests for all these invariants.


Co-authored-by: Simon Hornby <simon@getunleash.ai>
2021-11-24 13:08:04 +01:00
..
ext-logos chore: update readme 2021-06-13 23:26:20 +02:00
workflows Feat/variant api (#1119) 2021-11-24 13:08:04 +01:00
dashboard.png docs: Readme update dashboard screenshot (#953) 2021-09-23 21:19:10 +02:00
deploy-digital.svg chore: Added Deploy To Digital Ocean Button (#874) 2021-06-21 14:15:33 +02:00
deploy-heroku-20.png fix: styles to docs 2021-06-05 00:25:35 +02:00
FUNDING.yml Create FUNDING.yml 2020-02-20 08:34:31 +01:00
Logo_DarkBlue_Transparent_Portrait.png fix: update README.md 2021-06-04 19:31:28 +02:00
Logo_DarkBlue_Transparent_Portrait.svg fix: update README.md 2021-06-04 19:35:43 +02:00
logo.png fix: proper logo 2021-06-04 23:26:40 +02:00
Unleash_architecture.svg docs: improve introduction section 2021-06-14 21:48:19 +02:00
unleash-logo.svg Add unleash logo to README (#859) 2021-05-27 23:36:59 +02:00