Repository navigation
Commit 2c1d17f
committed
Refactor emitters/parsers to pure LibCST AST IR, decompose cli.py, and harden security/typing
- Eliminate embedded __arazzo_*_spec__ snapshot dicts across workflows, cli_sdk, fastapi, and tests; reconstruct Arazzo 1.1.0 IR directly from LibCST AST nodes, docstrings, decorators, and type annotations
- Refactor fastapi/emit.py, dao/emit.py, db/emit.py, and seeder/emit.py from raw string concatenation to LibCST AST construction with SQLAlchemy 2.0 select/Session.get DAOs, topological FK/$ref seeding, and live FastAPI DAO dependency wiring
- Centralize OpenAPI 3.2.0 / JSON Schema 2020-12 <-> Python type mapping and identifier sanitization in openapi_client.functions.utils; enforce required-before-optional parameter ordering in Client methods
- Decompose openapi_client.cli into scaffolding.py, docs_json.py, sync.py, servers/json_rpc.py (defaulting to 127.0.0.1), and servers/mcp_stdio.py (adding prompts/list and prompts/get handlers and fixing MCP tool input_dir/output_path mismatches)
- Harden resolve_external_refs against path traversal and invalid external JSON, isolate parse_openapi_dict via deep copy, and add quote-aware Arazzo simple condition tokenization and SelectorObject.type AST round-tripping
- Introduce unified CDDError exception hierarchy in openapi_client.exceptions, emit/parse Pydantic Field() validation constraints, and enforce 100% line/branch test coverage and 100% structured docstring coverage across src/, scripts/, tests/, and test/1 parent 7e202b7 commit 2c1d17f
53 files changed
Lines changed: 5673 additions & 1956 deletions
File tree
- scripts
- src/openapi_client
- arazzo
- classes
- cli_sdk_cdd
- cli_sdk
- dao
- db
- docstrings
- fastapi
- functions
- openapi
- seeder
- servers
- sqlalchemy_cdd
- tests
- workflows
- tests
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
| |||
45 | 52 | | |
46 | 53 | | |
47 | 54 | | |
| 55 | + | |
48 | 56 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
10 | 57 | | |
11 | 58 | | |
12 | 59 | | |
13 | | - | |
| 60 | + | |
14 | 61 | | |
15 | 62 | | |
16 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
17 | 67 | | |
| 68 | + | |
18 | 69 | | |
19 | 70 | | |
20 | 71 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
63 | 112 | | |
64 | 113 | | |
65 | 114 | | |
66 | 115 | | |
67 | 116 | | |
68 | 117 | | |
69 | | - | |
| 118 | + | |
70 | 119 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
372 | 372 | | |
373 | 373 | | |
374 | 374 | | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
375 | 424 | | |
376 | 425 | | |
377 | 426 | | |
| |||
385 | 434 | | |
386 | 435 | | |
387 | 436 | | |
388 | | - | |
| 437 | + | |
| 438 | + | |
389 | 439 | | |
390 | 440 | | |
391 | | - | |
| 441 | + | |
392 | 442 | | |
393 | | - | |
| 443 | + | |
| 444 | + | |
394 | 445 | | |
395 | 446 | | |
396 | | - | |
| 447 | + | |
397 | 448 | | |
398 | 449 | | |
399 | 450 | | |
400 | 451 | | |
401 | | - | |
402 | | - | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
403 | 455 | | |
404 | 456 | | |
405 | 457 | | |
| |||
549 | 601 | | |
550 | 602 | | |
551 | 603 | | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
552 | 609 | | |
553 | | - | |
| 610 | + | |
554 | 611 | | |
555 | 612 | | |
556 | 613 | | |
| |||
571 | 628 | | |
572 | 629 | | |
573 | 630 | | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
578 | 637 | | |
579 | 638 | | |
580 | 639 | | |
| |||
600 | 659 | | |
601 | 660 | | |
602 | 661 | | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
603 | 676 | | |
604 | | - | |
| 677 | + | |
605 | 678 | | |
606 | 679 | | |
607 | 680 | | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
608 | 686 | | |
609 | 687 | | |
610 | 688 | | |
| 689 | + | |
611 | 690 | | |
612 | 691 | | |
613 | 692 | | |
| |||
0 commit comments