Should model properties be optional?
I know for some songs Apple adds property for explicit lyrics and not for others. Won’t the decider fail unnecessarily for those options? Please confirm.
The structs in DataModel.swift is now created and implemented per Apple's sample response. I'm currently assuming that most of the fields showing up in the sample responses will be present for all types of respective resources. There might be fields unavailable thus won't show up for certain resources, causing issues for this framework. However, there seems not much resources mentioning which fields are always present which are not. I will for sure need more time in investigating and experimenting regarding this.
As you have mentioned, explicit lyrics mark can definitely be an "optional" field for a catalog song resource. Therefore, it needs to be handled properly. However, I have not added any code related to that part yet, and I will shortly be working on that. Thanks for pointing that out anyway!
In case you wonder the way of handling optional fields, checkout the struct Artwork part in DataModel.swift file for some details.
Sorry for responding this late, please comment if you have further questions!