-
Bug
-
Resolution: Done
-
High
-
None
Resource Resolution Basic Principles
1) If a default value is provided (irrespective of Empty "" or "xyz" string), it treats it as a valid default value and assign to the resource during resolution.
This was done to support a use case, where user intentionally wants to assign an Empty value to a Resource.Now if a resource is required not to be Empty, then either default tag shouldn't be present there or "default" : null should be there in properties.
2) Input value is given highest priority
For any resource it checks whether we have value in input or not -> if there then assign it as resolved value and continue to next resource.There can be case, where during design user marked source as default or other data-source.. but on run time he want to provide value in inputAs during run time user controls only input values, so highest priority is input
3) Copy API Level Default values to Input if it’s not already present in Input
As we are copying API default values to input section (only if resource value is not in input) -> so it doesn't matter for default sources if we have priority as input.If a source is marked default -> still it checks for input first If user is passing value in input (though is marked as default) it will assign the value which is provided in input (irrespective of data-source)
If a source is marked input -> and user doesn't provide any value in input -> it picks the API level default value and assignment it to resource.If a source is marked input -> and user doesn't provide any value in input -> and there is no default value defined -> it throws error.
4) A Rest URL should always respond back with a JSON, so that response can be parsed and mapped with output-key-mappings to resolve resources.
If all agrees to above, then I can open a review on ElAlto branch.