From fa1debf4282fd8ba83a51ced0931629b924e6df1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 04:03:02 +0000 Subject: [PATCH 1/2] Initial plan From ac31428fe51238cb62ce5385bbed9814dc8c85fd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 04:12:21 +0000 Subject: [PATCH 2/2] fix(python): remove "None" from known values in api_version docstring The api_version parameter is typed as `str` and None is not a valid API version value. Including "None" in the "Known values" list was misleading as passing api_version=None would flow through to request serialization rather than falling back to the default. Before: Known values are "2026-01-01-preview" and None. After: Known values are "2026-01-01-preview". Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> --- .../generator/pygen/codegen/models/parameter.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/http-client-python/generator/pygen/codegen/models/parameter.py b/packages/http-client-python/generator/pygen/codegen/models/parameter.py index d637e016446..bcca96fa75c 100644 --- a/packages/http-client-python/generator/pygen/codegen/models/parameter.py +++ b/packages/http-client-python/generator/pygen/codegen/models/parameter.py @@ -109,10 +109,16 @@ def description(self) -> str: if type_description: base_description = add_to_description(base_description, type_description) if self.optional and isinstance(self.type, ConstantType): - base_description = add_to_description( - base_description, - f"Known values are {self.get_declaration()} and None.", - ) + if self.is_api_version: + base_description = add_to_description( + base_description, + f"Known values are {self.get_declaration()}.", + ) + else: + base_description = add_to_description( + base_description, + f"Known values are {self.get_declaration()} and None.", + ) if not (self.optional or self.client_default_value): base_description = add_to_description(base_description, "Required.") if self.client_default_value is not None: