Files
summercms/cabana/form_schema.go
Jakub Zych ea3f0705f4 test(09-03): add failing test for strict form schema compilation
- All locked field kinds, empty and single documents, and source order fail closed
- Unknown keys, types, duplicates, path escape, modelClass, partials, and missing assets must name the plugin, controller, and file
2026-09-24 18:12:53 +02:00

29 lines
909 B
Go

package cabana
import (
"fmt"
"io/fs"
"git.golem15.com/golem15/summercms/pact"
)
// FormSchema is the boot-compiled form contract. The RED stub rejects every
// asset so the ADMIN-01 tests fail on the contract, not on a missing symbol.
type FormSchema struct{}
// CompileForm will compile config_form.yaml and fields.yaml. It does not yet.
func CompileForm(pluginID string, ctl pact.AdminController, fsys fs.FS) (*FormSchema, error) {
if pluginID == "" || ctl == nil || fsys == nil {
return nil, fmt.Errorf("cabana: form schema is not implemented")
}
return nil, fmt.Errorf("cabana: form schema is not implemented")
}
// CanonicalJSON will emit the stable form contract. It does not yet.
func (s *FormSchema) CanonicalJSON() ([]byte, error) {
if s == nil {
return nil, fmt.Errorf("cabana: form schema is not implemented")
}
return nil, fmt.Errorf("cabana: form schema is not implemented")
}