Repository navigation
Conversation
gsmith85
force-pushed
the
feat/codegen-cli-generate-types
branch
from
October 1, 2026 18:51
0c820b7 to
f0bc7be
Compare
gsmith85
force-pushed
the
feat/codegen-cli-generate-types
branch
2 times, most recently
from
October 1, 2026 20:17
05a8dee to
4ba168f
Compare
gsmith85
force-pushed
the
feat/codegen-compile-types
branch
from
October 1, 2026 23:45
19346d4 to
1ab4348
Compare
gsmith85
force-pushed
the
feat/codegen-cli-generate-types
branch
2 times, most recently
from
October 2, 2026 01:11
129075f to
0452980
Compare
gsmith85
force-pushed
the
feat/codegen-compile-types
branch
from
October 2, 2026 16:37
a85a726 to
8cac42b
Compare
gsmith85
force-pushed
the
feat/codegen-cli-generate-types
branch
from
October 2, 2026 16:37
0452980 to
095e38d
Compare
This was referenced Oct 2, 2026
gsmith85
force-pushed
the
feat/codegen-cli-generate-types
branch
from
October 7, 2026 06:00
095e38d to
eae1f7e
Compare
gsmith85
force-pushed
the
feat/codegen-compile-types
branch
from
October 7, 2026 06:00
8cac42b to
9d93d16
Compare
This was referenced Oct 7, 2026
Open
gsmith85
force-pushed
the
feat/codegen-cli-generate-types
branch
from
October 7, 2026 22:04
eae1f7e to
5a86208
Compare
gsmith85
force-pushed
the
feat/codegen-compile-types
branch
from
October 7, 2026 22:04
9d93d16 to
33ec2f4
Compare
Implement Task 4 (PR 1d) of the ucp-schema codegen pipeline: - Wire Commands::GenerateTypes in src/bin/ucp-schema.rs with --profile, --capability, --extension, --schema-dir (alias --schema-local-base), --schema-remote-base, --output, and --pretty. - Implement CliExitCode for CodegenError and generalize write_json_output to <T: serde::Serialize + ?Sized>. - Add CLI integration tests in tests/generate_types_test.rs covering stdout pretty/compact output, file output, repeatable/comma-delimited flags, and error exit codes. Stacked PR Roadmap: - PR 1a (#81): Identifier qualification, UCP keyword stripping, $ref rewriting - PR 1b (#82): Directional schema slicing and $ref alignment - PR 1c (#83): Capability/extension reachability, composition, and generate_types() library API - PR 1d (this PR): CLI generate-types subcommand - PR 2: Self-contained .well-known/ucp --profile scoping - PR 3: Inline conditional variant hoisting and ordered anyOf union lowering - PR 4: OpenAPI 3.1 REST binding assembly (generate-openapi)
gsmith85
force-pushed
the
feat/codegen-cli-generate-types
branch
from
October 8, 2026 00:32
5a86208 to
f7cdac2
Compare
gsmith85
force-pushed
the
feat/codegen-compile-types
branch
from
October 8, 2026 00:32
33ec2f4 to
31aae2f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements Task 4 (PR 1d) of the two-layer
ucp-schemacode-generation pipeline: wires theucp-schema generate-typesCLI subcommand insrc/bin/ucp-schema.rsand adds end-to-end CLI integration tests intests/generate_types_test.rs.Changes
src/bin/ucp-schema.rs):Commands::GenerateTypes(#[command(name = "generate-types")]) with--profile(-p),--capability(--capabilities, comma-delimited, conflicts with--profile),--extension(--extensions, comma-delimited, conflicts with--profile),--schema-dir(-s, alias--schema-local-base),--schema-remote-base(requires--schema-dir),--output(-o), and--pretty(defaults totrue).CliExitCodeforCodegenErrorand generalizeswrite_json_outputto<T: serde::Serialize + ?Sized>.tests/generate_types_test.rs):--output <file>generation, repeatable and comma-separated--capability/--extensionflags,--schema-local-basealias, and expected CLI exit codes (0,2,3).Stacked PR Series Roadmap
$refrewriting (src/codegen/normalizer.rs)$refalignment (src/codegen/normalizer.rs)generate_types()library API (src/codegen/{mod,reachability,hoist,compose}.rs)generate-typessubcommand (src/bin/ucp-schema.rs,tests/generate_types_test.rs).well-known/ucp--profilescoping (src/codegen/profile.rs)src/codegen/normalizer.rs,src/codegen/reify.rs)<Union>Base) (src/codegen/reify.rs)src/codegen/reify.rs)generate_models.sh,postprocess_models.py,src/ucp_sdk/models/)generate_models.sh,scripts/generate-zod-from-types.mjs,src/spec_generated.ts)ucp-schema generate-openapi,src/openapi/mod.rs)Test Plan
cargo test --all-targetscargo clippy --all-targets -- -D warningscargo fmt --check