feat(codegen): emit description in JSON Schema properties - #355
Merged
Conversation
property_type only emitted a property's type, so a secret's declared description never reached the generated schema even though the IR already carries it (build_union/build_profile_fields populate IrField.description from the manifest). quicktype turns a JSON Schema "description" into a native docstring in every target language, so this was a silent gap between what the manifest declares and what a generated SDK type documents. property_type now inserts a "description" key when the field has one, and omits it otherwise rather than emitting an empty or null value.
This was referenced Aug 16, 2026
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
property_typeincodegen.rs::schemaonly emitted a property'stype,even though the IR already carries each field's
description— populatedfrom the manifest by
build_unionandbuild_profile_fields. Thatdescription never reached the generated JSON Schema.
quicktype turns a JSON Schema
descriptioninto anative docstring in every target language, so this was a silent gap between
what a manifest declares and what an SDK type generated from it documents.
Change
property_typenow inserts adescriptionkey when the field has one, andomits it entirely otherwise (rather than emitting an empty or null value).
Validation
cargo test --package secretspec --all-features codegen::— 11 passedcargo fmt --all -- --checkcargo clippy -p secretspec --no-default-features --features cli -- -D warnings— no new warnings incodegen.rs(3 pre-existing failureselsewhere, present on
mainbefore this change too)