Skip to content

fix: restrict additional properties for canisters in dfx.json schema #4308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rvanasa
Copy link
Contributor

@rvanasa rvanasa commented Jul 9, 2025

This PR improves dfx.json schema validation by restricting unknown properties on canister objects. The motivation is to provide a warning/error when, for instance, specifying a build property for a non-custom canister.

It could make sense to make a wider change (more restrictions for additional objects in the schema) or a narrower change (only fixing the specific build case). For now, this seems like a reasonable middle ground.

@rvanasa rvanasa requested a review from a team as a code owner July 9, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant