add python toolchain for datamodel-code-generator

This commit is contained in:
sdcoffey
2026-03-09 19:50:07 -07:00
parent 5c38a595c7
commit 216013b8fb
12 changed files with 12540 additions and 11805 deletions

View File

@@ -1,6 +1,7 @@
use anyhow::Context;
use anyhow::Result;
use codex_app_server_protocol::generate_json_with_experimental;
use codex_app_server_protocol::generate_python_with_experimental;
use codex_app_server_protocol::generate_typescript_schema_fixture_subtree_for_tests;
use codex_app_server_protocol::read_schema_fixture_subtree;
use similar::TextDiff;
@@ -27,6 +28,13 @@ fn json_schema_fixtures_match_generated() -> Result<()> {
})
}
#[test]
fn python_schema_fixtures_match_generated() -> Result<()> {
assert_schema_fixtures_match_generated("python", |output_dir| {
generate_python_with_experimental(output_dir, false)
})
}
fn assert_schema_fixtures_match_generated(
label: &'static str,
generate: impl FnOnce(&Path) -> Result<()>,