test(09-05): add failing tests for writable fill and validate

- Create and update must Fill then Validate and return D-10 422 field errors
- Schema bindings exclude protected, cased, nested, and unknown keys
- Missing Fill or Validate capability fails closed with controller context
This commit is contained in:
Jakub Zych
2026-09-24 19:25:18 +02:00
parent 040f3ef81c
commit 1e14da7bb5
3 changed files with 452 additions and 0 deletions

View File

@@ -56,12 +56,20 @@ func (BackendUser) TableName() string { return "backend_users" }
// Option is a dropdown choice shared with later schema plans.
type Option = pact.Option
// WritableField is one schema field bound to a model fill key at activation.
// FillKey comes from the model column, not from request JSON.
type WritableField struct {
Name string
FillKey string
}
// CompiledController is one admin controller after YAML compilation.
type CompiledController struct {
PluginID string
Controller pact.AdminController
List *ListSchema
Form *FormSchema
Writable []WritableField
}
// Registry is the immutable controller map keyed by controller ID.