feat(amp-config): add JSON schema generation for ampd config#1747
Merged
feat(amp-config): add JSON schema generation for ampd config#1747
Conversation
7a3cd8e to
0bbf8bc
Compare
Enable external validation and editor tooling for the ampd TOML config file by generating a JSON schema from Rust types using schemars behind a feature gate. - Add `amp-config-gen` crate with build script that generates schema from `ConfigFile` - Add feature-gated `schemars` dependency chain across config, worker-core, common, and monitoring crates - Implement manual `JsonSchema` for `ConfigDuration`, `Overflow`, and `Redacted<T>` types - Integrate into `just gen` workflow and add standalone `just gen-config-schema` target Signed-off-by: Mitchell Spencer <mitchellhspencer@gmail.com>
0bbf8bc to
b18f8b5
Compare
LNSD
approved these changes
Feb 13, 2026
Contributor
LNSD
left a comment
There was a problem hiding this comment.
LGTM ✅
Please. Check my comments
Remove redundant explicit feature declarations and improve schema metadata per review. - Remove redundant `[features] schemars` from `common` and `monitoring` Cargo.toml (implicit feature from `optional = true` suffices) - Add `default = "default_compression_str"` to compression field schemars attribute - Add `default_compression_str()` helper to provide serializable default for JSON schema Signed-off-by: Mitchell Spencer <mitchellhspencer@gmail.com>
376484a to
0d04912
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.
Enable external validation and editor tooling for the ampd TOML config file by generating a JSON schema from Rust types using schemars behind a feature gate.
amp-config-gencrate with build script that generates schema fromConfigFileschemarsdependency chain across config, worker-core, common, and monitoring cratesJsonSchemaforConfigDuration,Overflow, andRedacted<T>typesjust genworkflow and add standalonejust gen-config-schematargetCloses #1693