Commit fc51b1f
[http-server-javascript] Two small correctness fixes (microsoft#5253)
This fixes two issues that showed up in the widget and petstore REST
examples.
- Required query parameters were being detected as missing if their
value was not exactly `null`. This PR changes this to a falsiness test.
- Checking literal range-constrained properties in type differentiation
could try to use a property without proving its presence. This PR adds
an `in` check to that logic so that range-constrained properties have
the same guard that literal-valued properties do.
---------
Co-authored-by: Will Temple <[email protected]>1 parent dddf9c7 commit fc51b1f
File tree
4 files changed
+28
-4
lines changed- .chronus/changes
- packages/http-server-javascript/src
- http/server
- util
4 files changed
+28
-4
lines changedLines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
| 456 | + | |
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| |||
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
742 | 742 | | |
743 | 743 | | |
744 | 744 | | |
745 | | - | |
746 | | - | |
747 | | - | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
748 | 758 | | |
749 | 759 | | |
750 | 760 | | |
| |||
0 commit comments