-
Notifications
You must be signed in to change notification settings - Fork 419
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
func new "HTTP trigger" incorrect case of ANONYMOUS for Python #3651
Comments
I should have included that it does not matter how you specify --authlevel, it will always be "Anonymous" in the generated code. |
Hi @robotdad I was able to repro the issue described with the string showing up in lowercase instead of all upper case- but not your second comment that the auth level always shows as Anonymous regardless of the indicated auth level. Can you please confirm the version of Core Tools you are using? |
func --version My comment was unclear, apologies. I meant that the casing of what I pass as the value to specify anonymous does not impact the code generation, either --authlevel ANONYMOUS or --authlevel anonymous generate the same code that uses mixed case Anonymous. If I don't specify --authlevel then func tools prompts to select a value and when choosing ANONYMOUS the generated code is correct. I've not tried the other auth levels. |
Thank you @robotdad for the detailed feedback. We will fix it soon. |
The code generated by the call below is incorrect for both v1 and v2 for Python.
func new --name HttpExample --template "HTTP trigger" --authlevel anonymous
This will generate the following line in function_app.py.
@app.route(route="HttpExample", auth_level=func.AuthLevel.Anonymous)
This should be:
@app.route(route="HttpExample", auth_level=func.AuthLevel.ANONYMOUS)
This breaks most getting started samples on mslearn for Python out of the box.
The text was updated successfully, but these errors were encountered: