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
You should add an error if they specify both uri and relativePath
Bugs
contentVersion validation is not correct - seems to always think linked template is version 1.0.0.0
Not getting correct error info for parameter type mismatches in linked templates (see Teams thread). testcase tc06
Need to discuss:
What if the file isn't loaded yet?
Gracefully handle getting null content for deeply-nested linked templates (because we're starting out with only one level)
--
Consider the following template structure (attached here)
deepsimplemaster.json -> links to "deep/deep.json"
deepsimplemaster.params.json
deep/
deep.json -> links to "verydeep/verydeep.json"
verydeep/
verydeep.json
We call TemplateController.ProcessAndValidateTemplate, and it calls it back with these two paths:
deep/deep.json
verydeep/verydeep.json
Trouble is, verydeep/verydeep.json should be relative to deep.json's path, but our callback only gives us "verydeep/verydeep.json", and we don't know its parent path, so we can't correctly resolve verydeep.json's full path.
Requirements (DRAFT)
If possible, use a callback for errors from linked or nested template validations instead of throwing an exception
In the linkedFileDelegation callback and the error callback (or error responses), we need:
The full path of the parent template
The location in the parent template that references the linked template
The value of all parameters passed in to the linked template
Suggested callback signature
Task<string> linkedFileDelegation(DeploymentContext context);
interface DeploymentContext {
int contextId; // Unique positive ID to label this context (only unique within a particular ProcessAndValidateTemplate call)
// One of these is filled in, the other is null
Uri templateLinkUri;
Uri templateLinkRelativeUri;
dictionary<string, any> parameterValues; // The resolved values for the parameters
int parentContext; // Zero if the parent is the top-level template file
int parentLine, parentColumn; // approximate location inside the parent template file where the linked (or nested?) template is referenced
}
The text was updated successfully, but these errors were encountered:
StephenWeatherford
changed the title
Validation API: Need way to resolve deeply-linked template paths
Validation API (linkedFileDelegation callback): Need way to resolve deeply-linked template paths
Jun 2, 2020
StephenWeatherford
changed the title
Validation API (linkedFileDelegation callback): Need way to resolve deeply-linked template paths
Validation API changes to support linked template validation
Oct 22, 2020
Issues/Bugs
--
Consider the following template structure (attached here)
deepsimplemaster.json -> links to "deep/deep.json"
deepsimplemaster.params.json
deep/
deep.json -> links to "verydeep/verydeep.json"
verydeep/
verydeep.json
We call TemplateController.ProcessAndValidateTemplate, and it calls it back with these two paths:
Trouble is, verydeep/verydeep.json should be relative to deep.json's path, but our callback only gives us "verydeep/verydeep.json", and we don't know its parent path, so we can't correctly resolve verydeep.json's full path.
Requirements (DRAFT)
Suggested callback signature
The text was updated successfully, but these errors were encountered: