You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that we have external validation rules stored for an analysis schema, we need to perform that external validation when an analysis is submitted or updated.
Details
when creating or updating an analysis, we will check for external validation rules that are attached to the analysis type
check for and apply external validations after the analysis passes the JSON schema validation and the file type validations (if present)
for each external validation rule on this analysis type:
check the value of the property in the analysis at the given path
if there is no value defined at that path, then no validation is required, this passes
if there is a value defined at that path, then we will check it with the configured external source
build a URL request to the URL included in the external validation rule
Request to the External Validation URL
Request definition:
GET Request
use the URL exactly as provided in analysis type config.
add query parameters:
studyId with the value of the study the analysis belongs to
value with the value as taken from the analysis property being validated
This URL will then look something like: ${url}?studyId=${study ID from analysis}&value=${property value from analysis}
Expected response
if the value is valid according to the external source, the response will have HTTP status 200 with no body
if value is invalid, the external source will return HTTP status 400. The external server may optionally return a JSON with the following form:
{
"error": "INVALID_VALUE",
"message": "Any string message describing why the value is invalid"
}
The message from this response can be included in the response to the analysis submitter as an explanation for why the provided analysis is invalid.
the external service may return other HTTP status error codes, for instance if it does not recognize the request or believes it to be malformed. SONG must be prepared for these errors, and when returned we will treat them as a failed validation. When this occurs, a message should be returned to the analysis submitter explaining that an external validation on their analysis was unable to complete and the analysis could not be submitted/updated.
Additional context
This is meant to integration with Lyric. Corresponding details for the development of this songValidation endpoint on that service will be linked from here once available.
The text was updated successfully, but these errors were encountered:
Summary of request
Building off of #871 and #872
Now that we have external validation rules stored for an analysis schema, we need to perform that external validation when an analysis is submitted or updated.
Details
Request to the External Validation URL
Request definition:
studyId
with the value of the study the analysis belongs tovalue
with the value as taken from the analysis property being validatedThis URL will then look something like:
${url}?studyId=${study ID from analysis}&value=${property value from analysis}
Expected response
200
with no body400
. The external server may optionally return a JSON with the following form:Additional context
This is meant to integration with Lyric. Corresponding details for the development of this songValidation endpoint on that service will be linked from here once available.
The text was updated successfully, but these errors were encountered: