Validate against schema programatically
Hello,
I am running a transformDTL through COS that transforms an EDI document to JSON and would like to validate the document and throw an error if it does not validate or build a map.
I am looking at available methods and haven't been able to find one that sort of does: Set tSC = ##class(*).Validate(tDoc,"HIPAA_5100").
Any help here would be appreciated, it seems like I am missing something simple.
On a whole class approach. I created a class with a less restrictive property data sizes with the same property names as a more restrictive target class to validate against. Inside a try catch set each matching property. It will catch on which properties fail with a specific property error. This should work with the new dynamic objects instead of the less restrictive class approach.