-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test 'URIs Should Be Properly Constructed' limits usage of templates #417
Comments
We are also incorrectly flagging concat/format in the value - it should be disallowed at the beginning of the expression only. @pavelsalamon - the proper format for your case would be:
But the test will also flag that (you may have tried already) - so the test is to broad in it's assumptions and needs to be fixed. |
I've commented out the test for now... |
👍 let's see how we can improve this. |
…ns are allowed within a uri
* Fixing #417: Re-adding URI format test and ensuring that functions are allowed within a uri * Fixing unknown api version in deployments (false negative) * Delete URI-Using-Concat.json Co-authored-by: James Brundage <@github.com> Co-authored-by: Brian Moore <bmoore@microsoft.com>
Likely as the test was re-enabled... the test is checking for the uri function and flagging other functions for creating URLs/URIs... So flagging:
would be intentional. The fix would be to use the |
Yes, using of Concat() inside of URI() function works, and passes validation.
|
With newly added test URIs Should Be Properly Constructed, it's impossible to produce url as template output dynamically.
I was producing template output in this way:
This doesn't pass through the test because of usage of concat function.
However, I can't produce the url without using concat function - trying to use uri() instead is not possible because uri() is too restrictive on its first parameter. Any attempt to use uri() function fails with errors like these:
Here's an example of my attempt with uri:
I tried putting various strings as first parameter of uri:
http
,http:
,http://
and they all fail. It only accepts uri with some path in it, but I can only produce that using concat function.The text was updated successfully, but these errors were encountered: