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