Azure / Azure/azure-sdk-for-python
API version validation looks bugged
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 3.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 193
Description
- **Package Name**: azure-mgmt-resources-deploymentstacks
- **Package Version**: 1.0.0
- **Operating System**: Windows
- **Python Version**: 3.13
**Describe the bug**
The API version validation in this package appears to have a bug. We have a new query parameter added on a new API version. The generated code that creates this request specifies this new query parameter as a keyword arg set to `None` by default. We do not set this query parameter at all in our code (CLI), but validation throws the parameter is not supported on the API version. It seems this validation is considering new query parameter set to `None` as a validation error when it should not.
**To Reproduce**
Steps to reproduce the behavior:
1. Checkout https://github.com/Azure/azure-cli/pull/32777 at commit `bc8df278a1f7e93bc5987565693900e3ac61119f`
2. Run `azdev setup -c` to install updated packages
3. Run `azdev test DeploymentStacksTest`
4. See test failures like in screenshot.
**Expected behavior**
Tests don't error with `unmanage_action_resources_without_delete_support` not supported on `2024-03-01` API version (the preexisting API version) when this is set to `None`.
**Screenshots**
Test errors:
It is set to `None`:
**Additional context**
I don't think this is blocking me because I intend to upgrade to the latest API version.
Contributor guide
Assessment
This issue has not been assessed yet.