Commit ba21576
committed
fix(platform-api): align upstreamDefinition timeout and weight validation with the gateway
Restrict an upstreamDefinition connect timeout to ms, s, m, or h units. time.ParseDuration alone also accepts ns/us units and compound values like 1h30m that the gateway rejects at deploy, so without this an API saves at the control plane and then fails to deploy. This matches the connect pattern already published in the OpenAPI spec.
Set the upstream weight schema minimum to 0 to match the validator and the gateway, which both accept a 0..100 range.1 parent a860c44 commit ba21576
3 files changed
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
676 | 682 | | |
677 | 683 | | |
678 | 684 | | |
| |||
745 | 751 | | |
746 | 752 | | |
747 | 753 | | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
748 | 757 | | |
749 | 758 | | |
750 | 759 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
679 | 690 | | |
680 | 691 | | |
681 | 692 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6556 | 6556 | | |
6557 | 6557 | | |
6558 | 6558 | | |
6559 | | - | |
| 6559 | + | |
6560 | 6560 | | |
6561 | 6561 | | |
6562 | 6562 | | |
| |||
0 commit comments