Commit 0e02281
committed
Allow for scope descriptions
This makes a small change to the code introduced in #849 to allow for models to be used as OAuth scopes.
Without this check, an object like `{value: "foo", description: "bar"}` gets wrapped in an additional `value` key.
When the OpenAPI3 emitter tries to print out the `securitySchemes`, it sees `{value: {...}}` and produces a scope with value `[object Object]` and no description.
This also introduces a base `SecurityScheme` model that allows for more specific type checking on the `@useAuth` decorator.
We need to remove an `openapi3` test that checks for an error when providing an unsupported auth type.
Now the compiler enforces that the auth type is `AuthType`, and `openapi3` supports all of the types in `AuthType`, it should not be possible to trigger this condition in TSP.1 parent 63739c4 commit 0e02281
File tree
6 files changed
+91
-29
lines changed- .chronus/changes
- packages
- http
- lib
- src
- test
- openapi3/test
6 files changed
+91
-29
lines changedLines 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 | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
5 | 9 | | |
| |||
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | | - | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
47 | | - | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
92 | | - | |
| 96 | + | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| |||
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
103 | 117 | | |
104 | 118 | | |
105 | 119 | | |
| |||
111 | 125 | | |
112 | 126 | | |
113 | 127 | | |
114 | | - | |
| 128 | + | |
115 | 129 | | |
116 | 130 | | |
117 | 131 | | |
| |||
154 | 168 | | |
155 | 169 | | |
156 | 170 | | |
157 | | - | |
| 171 | + | |
158 | 172 | | |
159 | 173 | | |
160 | 174 | | |
| |||
169 | 183 | | |
170 | 184 | | |
171 | 185 | | |
172 | | - | |
| 186 | + | |
173 | 187 | | |
174 | 188 | | |
175 | 189 | | |
| |||
184 | 198 | | |
185 | 199 | | |
186 | 200 | | |
187 | | - | |
| 201 | + | |
188 | 202 | | |
189 | 203 | | |
190 | 204 | | |
| |||
199 | 213 | | |
200 | 214 | | |
201 | 215 | | |
202 | | - | |
| 216 | + | |
203 | 217 | | |
204 | 218 | | |
205 | 219 | | |
| |||
212 | 226 | | |
213 | 227 | | |
214 | 228 | | |
215 | | - | |
| 229 | + | |
216 | 230 | | |
217 | 231 | | |
218 | 232 | | |
| |||
225 | 239 | | |
226 | 240 | | |
227 | 241 | | |
228 | | - | |
| 242 | + | |
229 | 243 | | |
230 | 244 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
378 | 381 | | |
379 | 382 | | |
380 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
621 | 624 | | |
622 | 625 | | |
623 | 626 | | |
624 | | - | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
625 | 632 | | |
626 | 633 | | |
627 | 634 | | |
| |||
630 | 637 | | |
631 | 638 | | |
632 | 639 | | |
633 | | - | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
634 | 644 | | |
635 | 645 | | |
636 | 646 | | |
637 | 647 | | |
638 | | - | |
639 | | - | |
| 648 | + | |
| 649 | + | |
640 | 650 | | |
641 | 651 | | |
642 | | - | |
| 652 | + | |
643 | 653 | | |
644 | 654 | | |
645 | 655 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
897 | 897 | | |
898 | 898 | | |
899 | 899 | | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
900 | 941 | | |
901 | 942 | | |
902 | 943 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | 250 | | |
264 | 251 | | |
265 | 252 | | |
| |||
0 commit comments