Commit c5419c6
committed
Refactor ElicitRequestParams and McpServerExtensions. #630
- Simplified "type" property handling in Converter.
- Changed s_lazyElicitAllowedProperties to nullable type.
- Updated ElicitAsync to use static lambda for clarity.
- Refactored CreatePrimitiveSchema to handle nullable types.
- Initialized allowed properties in TryValidateElicitationPrimitiveSchema.
- Updated ElicitationTypedTests for naming conventions and added tests for nullable properties.
- Enforced required properties in SampleForm and introduced NullablePropertyForm.
- Added JSON source generation context for NullablePropertyForm.1 parent 2f1dcf0 commit c5419c6
3 files changed
Lines changed: 74 additions & 28 deletions
File tree
- src/ModelContextProtocol.Core
- Protocol
- Server
- tests/ModelContextProtocol.Tests/Protocol
Lines changed: 1 addition & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 129 | + | |
137 | 130 | | |
138 | 131 | | |
139 | 132 | | |
| |||
Lines changed: 20 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 24 | + | |
30 | 25 | | |
31 | 26 | | |
32 | 27 | | |
| |||
279 | 274 | | |
280 | 275 | | |
281 | 276 | | |
282 | | - | |
| 277 | + | |
283 | 278 | | |
284 | 279 | | |
285 | 280 | | |
| |||
344 | 339 | | |
345 | 340 | | |
346 | 341 | | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
351 | 348 | | |
352 | 349 | | |
353 | 350 | | |
354 | | - | |
| 351 | + | |
355 | 352 | | |
356 | 353 | | |
357 | | - | |
| 354 | + | |
358 | 355 | | |
359 | | - | |
| 356 | + | |
360 | 357 | | |
361 | 358 | | |
362 | 359 | | |
| |||
365 | 362 | | |
366 | 363 | | |
367 | 364 | | |
368 | | - | |
| 365 | + | |
369 | 366 | | |
370 | 367 | | |
371 | 368 | | |
| |||
421 | 418 | | |
422 | 419 | | |
423 | 420 | | |
424 | | - | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
425 | 429 | | |
426 | 430 | | |
427 | 431 | | |
| |||
Lines changed: 53 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
51 | 64 | | |
52 | 65 | | |
53 | 66 | | |
| |||
222 | 235 | | |
223 | 236 | | |
224 | 237 | | |
225 | | - | |
| 238 | + | |
226 | 239 | | |
227 | 240 | | |
228 | 241 | | |
| |||
251 | 264 | | |
252 | 265 | | |
253 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
254 | 290 | | |
255 | 291 | | |
256 | 292 | | |
| |||
286 | 322 | | |
287 | 323 | | |
288 | 324 | | |
289 | | - | |
| 325 | + | |
290 | 326 | | |
291 | | - | |
| 327 | + | |
292 | 328 | | |
293 | 329 | | |
294 | 330 | | |
| |||
297 | 333 | | |
298 | 334 | | |
299 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
300 | 343 | | |
301 | 344 | | |
302 | 345 | | |
| |||
313 | 356 | | |
314 | 357 | | |
315 | 358 | | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
316 | 365 | | |
317 | 366 | | |
318 | 367 | | |
| |||
0 commit comments