Azure / Azure/azure-rest-api-specs
ApplicationGatewayFirewallExclusion should list allowed values
- Dominant language
- TypeSpec
- Stars
- 3.1k
- Forks
- 5.9k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 424
Description
Swagger gives no indication that the MatchVariable and SelectorMatchOperator fields only accept discrete values. When you supply something unsupported you get the following unhelpful error from the service:
`Exclusion MatchVariable 'blah' is unsupported for Application Gateway Firewall in context 'properties.webApplicationFirewallConfiguration.exclusions[0]'.`
The allowed values should be modeled in Swagger so appropriate enums are generated and validated for all SDKs and client tools. Since the service gives no indication what values are supported, the end result is that individual tools have to implement their own validation, rendering useless any supposed benefit of modeling the variables as strings.
Contributor guide
Research direction
Start by locating the ApplicationGatewayFirewallExclusion definition in the repository's Swagger/OpenAPI specifications and inspect the MatchVariable and SelectorMatchOperator fields. Determine the service-supported values, model them as enums, and verify that generated SDKs and client tools expose and validate those allowed values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100