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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user