← Back to issue list

Conditionally add build-slices to the json schema

View original Github issue

Metadata

Project
craft-application
Number
#1195
Type
issue
State
open
Author
mr-cal
Labels
Status: Triaged Type: Enhancement
Created
Updated
Closed
—

Current evaluation

Triaged enhancement to conditionally expose the existing top-level build-slices field in JSON schema when AppMetadata.enable_build_slices is enabled; it remains unimplemented.

Suggested action: keep open

Reason: Project.build_slices is explicitly wrapped in SkipJsonSchema, and tests still call Project.model_json_schema() directly, confirming the reported schema gap. The Triaged/Enhancement label and specified condition make this valid, well-defined work, although connecting AppMetadata state to Pydantic's class-level schema generation requires some design work.

Evaluated by: mr-cal-bot

Impact: 40 Quick Win: 12 Complexity: 60 Confidence: 94 Actionability: 78

Issue body

### What needs to get done The top-level `build-slices` key is not part of the json schema. We should override pydantic's json schema generator to add it to the schema when `AppMetadata.enable_bulid_slices` is enabled. ### Why it needs to get done To improve the json schema.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 40
Quick Win: 12
Complexity: 60
Confidence: 94
Actionability: 78
keep open Triaged enhancement to conditionally expose the existing top-level build-slices field in JSON schema when AppMetadata.enable_build_slices is enabled; it remains unimplemented.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 11
Complexity: 40
Confidence: 70
Actionability: 60
keep open Enhancement to conditionally add build-slices to JSON schema when AppMetadata.enable_build_slices is enabled. Issue is triaged and open.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#1188 feat: add build-slice support, top-level build-slice key craft-application closed Merged #1188, adding AppMetadata.enable_build_slices and top-level build-slices support; empty or null values are now a no-op.
75%