Refactor models to use single struct per entity

This commit is contained in:
2024-09-15 21:07:46 +02:00
parent 6d432b9de4
commit 527a659a1b
41 changed files with 778 additions and 1576 deletions

View File

@@ -34,6 +34,10 @@ func RequestPost[TResult any](t *testing.T, baseURL string, urlSuffix string, bo
return RequestAny[TResult](t, "", "POST", baseURL, urlSuffix, body, true)
}
func RequestAuthPostRaw(t *testing.T, akey string, baseURL string, urlSuffix string, body any) string {
return RequestAny[string](t, akey, "POST", baseURL, urlSuffix, body, false)
}
func RequestAuthPost[TResult any](t *testing.T, akey string, baseURL string, urlSuffix string, body any) TResult {
return RequestAny[TResult](t, akey, "POST", baseURL, urlSuffix, body, true)
}

View File

@@ -135,13 +135,13 @@ func assertjsonStructureMatchMapObject(t *testing.T, mapschema map[string]any, r
for k := range mapschema {
if _, ok := realValue[k]; !ok {
t.Errorf("Missing Key: < %s >", keyPath)
t.Errorf("Missing Key: < %s >", keyPath+"."+k)
}
}
for k := range realValue {
if _, ok := mapschema[k]; !ok {
t.Errorf("Additional key: < %s >", keyPath)
t.Errorf("Additional key: < %s >", keyPath+"."+k)
}
}