This commit is contained in:
Max Richter
2025-09-25 16:41:26 +02:00
parent 3f0d25f935
commit b13d5015f4
75 changed files with 3881 additions and 141 deletions

View File

@@ -18,10 +18,10 @@ func RenderFile(rawJSON []byte) ([]byte, error) {
return nil, fmt.Errorf("failed to parse JSON: %w", err)
}
// 2) extract type from "@type" Property
contentType, ok := data["@type"].(string)
// 2) extract type from "_type" Property
contentType, ok := data["_type"].(string)
if !ok || contentType == "" {
return nil, fmt.Errorf("JSON does not contain a valid '@type' property")
return nil, fmt.Errorf("JSON does not contain a valid '_type' property")
}
// 3) get the template from the registry