feat(09-06): serve admin form schemas and match Winter relations

- GET schema/form localizes the compiled form after the permission check
- relation: genre resolves to the exported Go field without changing the YAML key
This commit is contained in:
Jakub Zych
2026-09-24 20:10:48 +02:00
parent 3e7738ff32
commit c63146accb
3 changed files with 62 additions and 29 deletions

View File

@@ -330,6 +330,9 @@ func listModelContract(ctl pact.AdminController) (map[string]struct{}, map[strin
}
if isListRelation(field.Type) {
rels[field.Name] = struct{}{}
// Winter YAML spells relations in lowercase (relation: genre)
// while the Go field is exported (Genre).
rels[strings.ToLower(field.Name)] = struct{}{}
continue
}
name := gormColumn(field)