Azure / Azure/api-management-policy-snippets
Syntax error when processing this sample
- Dominant language
- No language data
- Stars
- 399
- Forks
- 170
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/Azure/api-management-policy-snippets/blob/48b493cb1653c6a49ec610ed577719a93d5b096e/examples/Call%20out%20to%20an%20HTTP%20endpoint%20and%20cache%20the%20response.policy.xml#L12
It seems that this snippet:
context.Request.MatchedParameters.GetValueOrDefault("place=""") // fails with a missing comma.
whilst using it this way:
context.Request.MatchedParameters.GetValueOrDefault("place", "") // works without an issue.
The other parts where there is a variable with var="" under double quotes, the parser doesn't like much.
Contributor guide
No contributing guide indexed for this repository
Research direction
Open examples/Call out to an HTTP endpoint and cache the response.policy.xml and inspect line 12 alongside the working GetValueOrDefault form. Check the other var="" occurrences in the sample, and consider the issue done when the policy parses without the reported missing-comma error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, xml
- Domain
- api, cloud
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100