feat: Expose json schema for config file #30
No reviewers
Labels
No labels
automerge
bug
dependencies
duplicate
help wanted
invalid
lang
rust
migrations
opencode
question
security
type
documentation
type
enhancement
type
maintenance
type
refactor
vulnerability
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Personal/woodpecker-extension!30
Loading…
Reference in a new issue
No description provided.
Delete branch "schema-rs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
603bc3e7d54afbcf2e324afbcf2e32fe0415e500WIP: feat: Expose json schema for config fileto feat: Expose json schema for config fileReview Summary
This PR adds JSON Schema generation for the configuration file using the
schemarscrate. The schema is exposed via an HTTP endpoint (/config.schema.json) and installed as a file in the Nix package. The implementation is solid and well-structured.Positives:
#[cfg_attr(test, derive(Default))]instead of manual Default implshttp_signature.rsconfig-schemabinary approach is clean for generating the schema independentlyMinor concerns:
#[allow(dead_code)]insrc/bin/config-schema.rsis technically unnecessary since the schema is generated via derive macros, not direct usagejustfilerunrecipe change to@(silent) is a behavior change mixed into an unrelated feature PRreturnremoval,.map(|s| s)→.collect()) are mixed in; these could be separate cleanup commits*🤖 Review by opencode (opencode/mimo-v2.5-free) — verdict: approve
Code review findings from opencode.
@ -13,3 +13,2 @@[group("Cargo")]run $WOODPECKER_EXTENSION_CONFIG=DEV_CONFIG:cargo run@run $WOODPECKER_EXTENSION_CONFIG=DEV_CONFIG:@ -0,0 +1,16 @@#![allow(dead_code)]