Commit f494ab5
committed
fix expanded-corpus generation: media types, validation patterns, paths, allOf aliases
Probe-driven fixes from running 241 previously-failing APIs.guru specs
(AWS, Adyen, apisetu.gov.in, api.video, ...) through client and server
generation. 210/240 now generate cleanly (was ~2%):
- allOf [$ref, {description}] self-references are type aliases again;
recursive expansion overflowed the stack on AWS-style specs.
- application/pdf responses classify as Binary; application/xml and +xml
suffixed types classify as Text on both response and request sides.
- best_content() falls back to character-data media (text/xml etc.)
instead of leaving XML-only request bodies unsupported.
- Validation pattern normalization: Java POSIX classes (\p{Print},
\p{Alpha}, ...) translate to ASCII ranges, ECMA \uXXXX escapes to
Rust \u{XXXX}, legacy octal escapes to \xNN. Patterns that still
cannot compile offline (look-around, backreferences) degrade to
"no pattern check" instead of failing generation.
- AWS x-pattern extension promotes to the standard pattern keyword.
- Validation bundle component keys are prefixed so a schema named like
a JSON Schema keyword (`id`) survives meta-schema validation.
- AWS query markers (/tags/{arn}#tagKeys) strip the #fragment before
route generation; webhook synthetic paths gain their leading `/`.
- Server code qualifies non-canonical schema names (not-found) with
their canonical Rust identifiers via rust_type_name().
Remaining known gaps (fail loudly, not silently wrong): form-style
object-array query items (AWS query protocol wire shape is undefined
by OpenAPI), multipart server extraction, YAML tab-indentation specs,
and one PathItem-as-string spec.1 parent 4ec3798 commit f494ab5
10 files changed
Lines changed: 665 additions & 115 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
708 | 721 | | |
709 | 722 | | |
710 | 723 | | |
| |||
2395 | 2408 | | |
2396 | 2409 | | |
2397 | 2410 | | |
2398 | | - | |
2399 | | - | |
2400 | | - | |
2401 | | - | |
2402 | | - | |
2403 | | - | |
2404 | | - | |
2405 | | - | |
2406 | | - | |
2407 | | - | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
2408 | 2423 | | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
2409 | 2451 | | |
2410 | 2452 | | |
2411 | 2453 | | |
| |||
4335 | 4377 | | |
4336 | 4378 | | |
4337 | 4379 | | |
4338 | | - | |
| 4380 | + | |
4339 | 4381 | | |
4340 | 4382 | | |
4341 | 4383 | | |
| |||
4514 | 4556 | | |
4515 | 4557 | | |
4516 | 4558 | | |
4517 | | - | |
| 4559 | + | |
4518 | 4560 | | |
4519 | 4561 | | |
4520 | 4562 | | |
| |||
4596 | 4638 | | |
4597 | 4639 | | |
4598 | 4640 | | |
4599 | | - | |
| 4641 | + | |
| 4642 | + | |
| 4643 | + | |
| 4644 | + | |
| 4645 | + | |
4600 | 4646 | | |
4601 | 4647 | | |
4602 | 4648 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
267 | 330 | | |
268 | 331 | | |
269 | 332 | | |
| |||
3024 | 3087 | | |
3025 | 3088 | | |
3026 | 3089 | | |
3027 | | - | |
3028 | | - | |
3029 | | - | |
3030 | | - | |
3031 | | - | |
3032 | | - | |
3033 | | - | |
3034 | | - | |
3035 | | - | |
3036 | | - | |
3037 | | - | |
3038 | | - | |
3039 | | - | |
3040 | | - | |
3041 | | - | |
3042 | | - | |
3043 | | - | |
3044 | | - | |
3045 | | - | |
3046 | | - | |
3047 | | - | |
3048 | | - | |
3049 | | - | |
3050 | | - | |
3051 | | - | |
3052 | | - | |
3053 | | - | |
3054 | | - | |
3055 | | - | |
3056 | | - | |
3057 | | - | |
3058 | | - | |
3059 | | - | |
3060 | | - | |
3061 | | - | |
3062 | | - | |
3063 | | - | |
3064 | | - | |
3065 | | - | |
3066 | | - | |
3067 | | - | |
3068 | | - | |
3069 | | - | |
3070 | | - | |
3071 | | - | |
3072 | | - | |
3073 | | - | |
3074 | | - | |
3075 | | - | |
3076 | | - | |
3077 | | - | |
3078 | | - | |
3079 | | - | |
3080 | | - | |
3081 | | - | |
3082 | | - | |
3083 | | - | |
3084 | | - | |
3085 | | - | |
3086 | | - | |
3087 | | - | |
3088 | | - | |
3089 | | - | |
3090 | | - | |
3091 | | - | |
3092 | | - | |
3093 | | - | |
3094 | | - | |
3095 | | - | |
3096 | | - | |
3097 | | - | |
3098 | | - | |
3099 | | - | |
3100 | | - | |
3101 | | - | |
3102 | | - | |
3103 | | - | |
3104 | | - | |
3105 | | - | |
3106 | | - | |
3107 | | - | |
3108 | | - | |
3109 | | - | |
3110 | | - | |
3111 | | - | |
3112 | | - | |
3113 | | - | |
3114 | | - | |
3115 | | - | |
| 3090 | + | |
3116 | 3091 | | |
3117 | 3092 | | |
3118 | 3093 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1079 | 1079 | | |
1080 | 1080 | | |
1081 | 1081 | | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
1082 | 1088 | | |
1083 | 1089 | | |
1084 | 1090 | | |
1085 | 1091 | | |
1086 | | - | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
1087 | 1100 | | |
1088 | 1101 | | |
1089 | 1102 | | |
| |||
1132 | 1145 | | |
1133 | 1146 | | |
1134 | 1147 | | |
| 1148 | + | |
1135 | 1149 | | |
1136 | 1150 | | |
1137 | 1151 | | |
| |||
1222 | 1236 | | |
1223 | 1237 | | |
1224 | 1238 | | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
1225 | 1244 | | |
1226 | 1245 | | |
1227 | 1246 | | |
| |||
1552 | 1571 | | |
1553 | 1572 | | |
1554 | 1573 | | |
1555 | | - | |
| 1574 | + | |
1556 | 1575 | | |
1557 | 1576 | | |
1558 | 1577 | | |
1559 | 1578 | | |
1560 | 1579 | | |
1561 | 1580 | | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
1562 | 1596 | | |
1563 | 1597 | | |
1564 | 1598 | | |
| |||
0 commit comments