Stream: IG creation
Topic: Slicing Validation Error
Abdullah Rafiqi (Jun 08 2020 at 19:50):
I'm generating an error that was present in a previous iteration of the IG publisher, disappeared in v1.0.95 and reappeared in v1.0.98.
I have added a screen shot of a profile spreadsheet that builds from the Measure resource and have sliced the meta.profile
element with a discriminator of "profile". Assigned the profile a canonical url value.
The following error is being generated "Unable to resolve discriminator in definitions: profile" along with the following information Element 'Measure.meta.profile[cqlProfile]': Unable to check minimum required (1) due to lack of slicing validation.
Any suggestions would be greatly appreciated.
Lloyd McKenzie (Jun 08 2020 at 22:30):
Are you seeing other errors/warnings about slicing validation? That's where you should start...
Abdullah Rafiqi (Jun 09 2020 at 00:53):
That is the only error/warning that i get about slicing validation and it persists on every resource that contains the slice of the meta.profile
element
Lloyd McKenzie (Jun 09 2020 at 03:21):
What does your slicing element say?
Abdullah Rafiqi (Jun 09 2020 at 14:35):
Its a slice to require that instances declare their profile. We've sliced the Measure.meta.profile
with a "profile" discriminator. The profile value=[Canonical URL]. Error being generated is the "Unable to resolve discriminator in definitions: profile"
Lloyd McKenzie (Jun 09 2020 at 15:07):
You don't want a "profile" discriminator, you want a "value" discriminator. "profile" discriminator means you want Meta.meta.profile (i.e. the 'string' content of that element) to be valid against a particular profile.
Abdullah Rafiqi (Jun 10 2020 at 17:03):
Meant to say that it is a "value" discriminator. Within the profile spreadsheet, the discriminator of the slice is profile (which is declared in the discriminator column of the spreadsheet) with the Measure.meta.profile
DE. The following row has the profile name defining the slice (cqlProfile) with the Measure.meta.profile
DE and contains the <profile value=[Canonical URL]/> in the value column. The profile looks to be generated correctly but still not sure why the discriminator can't be resolved
Abdullah Rafiqi (Jun 10 2020 at 17:05):
Grahame Grieve (Jun 10 2020 at 20:00):
because you are slicing by profile
on profile
- in other words, by .meta.profile.profile. use $this instead for the discriminator value
Abdullah Rafiqi (Jun 19 2020 at 15:45):
many thanks for the help!
Last updated: Apr 12 2022 at 19:14 UTC