Add schema directive to empty template - #3717
Merged
itowlson merged 1 commit intoSep 15, 2026
Merged
Conversation
Contributor
Author
|
Pleasingly, this also fixes #3698 does the bug smiting dance |
fibonacci1729
approved these changes
Sep 15, 2026
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
itowlson
force-pushed
the
empty-template-schema-directive
branch
from
September 15, 2026 21:08
358f218 to
858d196
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.
Fixes #3699.
The current
AppManifestserialisation type requires that there be at least one trigger. This makes the empty manifest invalid under the current schema.I've proposed to fix this by allowing an empty set of triggers at the serialisation level, but validating during load. This changes the error output when you
spin upan app with no triggers:The alternative is to keep the existing requirement and accept that there will be red squigglies in a new empty app. However, like the "before" error, the message will be correct but it will point to the wrong place, so I have pretty mixed feelings about this.
Note that we will want to publish a new schema directive before tagging this template - at the moment we merge it, the directive will continue to point to the "trigger required" schema, which fails. But as noted, the failure at least comes with a good error message, so eh.