feat(09-04): compile ordered Winter list schemas

- Typed columns, actions, default sort, search term, and page sizes
- Omitted sortable defaults to true and empty collections marshal as arrays
- Unknown keys, bad defaults, and path escape fail before routes are served
This commit is contained in:
Jakub Zych
2026-09-24 18:46:53 +02:00
parent fd591ed3a7
commit aab4398ce4
5 changed files with 448 additions and 134 deletions

View File

@@ -56,23 +56,6 @@ func (BackendUser) TableName() string { return "backend_users" }
// Option is a dropdown choice shared with later schema plans.
type Option = pact.Option
// ListColumn is one compiled columns.yaml entry, in file order.
type ListColumn struct {
Key string `json:"key"`
Label string `json:"label"`
Searchable bool `json:"searchable"`
Sortable bool `json:"sortable"`
Type string `json:"type,omitempty"`
}
// ListSchema is the boot-compiled list contract for one controller.
type ListSchema struct {
Title string `json:"title,omitempty"`
RecordsPerPage int `json:"recordsPerPage"`
ShowSearch bool `json:"showSearch"`
Columns []ListColumn `json:"columns"`
}
// CompiledController is one admin controller after YAML compilation.
type CompiledController struct {
PluginID string