SwiftEmbed 1.2.0
Breaking Changes
- Bundle is now the first parameter without label
- Removed default Bundle.main - must be explicit
New API
// Property wrappers
@Embedded.json(Bundle.main, path: "file.json")
@Embedded.yaml(Bundle.module, path: "file.yaml")
// Direct loading
Embedded.getJSON(Bundle.main, path: "file.json", as: [User].self)
Embedded.getYAML(Bundle.module, path: "file.yaml", as: Config.self)Migration
Change from:
@Embedded.json("file.json", bundle: Bundle.module)Embedded.getJSON("file.json", bundle: Bundle.module, as: T.self)
To:
@Embedded.json(Bundle.module, path: "file.json")Embedded.getJSON(Bundle.module, path: "file.json", as: T.self)