Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 19, 2026

fix #9404
fix #9026

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Copilot AI changed the title [WIP] Add test case for http-client-python Add enum array encoding test cases for http-client-python Jan 19, 2026
Copilot AI requested a review from msyyc January 19, 2026 05:03
@microsoft-github-policy-service microsoft-github-policy-service bot added the emitter:client:python Issue for the Python client emitter: @typespec/http-client-python label Jan 19, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 19, 2026

Open in StackBlitz

npm i https://pkg.pr.new/microsoft/typespec/@typespec/http@9407
npm i https://pkg.pr.new/microsoft/typespec/@typespec/http-client@9407

commit: c6adc55

@msyyc msyyc changed the title Add enum array encoding test cases for http-client-python [python] support enum type for array encode Jan 19, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 19, 2026

All changed packages have been documented.

  • @typespec/http-client-python
Show changes

@typespec/http-client-python - feature ✏️

Support enum type for array encode

@msyyc msyyc marked this pull request as ready for review January 19, 2026 09:22
@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for enum types in array encoding for the Python HTTP client generator. It addresses issues #9404 and #9026 by updating the deserialization logic to handle delimited arrays containing enum and extensible enum values.

Changes:

  • Updated @typespec/http-specs dependency from 0.1.0-alpha.31 to 0.1.0-alpha.32-dev.1 to include new test specifications
  • Added comprehensive test coverage for enum and extensible enum array encoding with various delimiters (comma, space, pipe, newline)
  • Refactored _deserialize_sequence logic in model_base.py.jinja2 to support union types containing array-encoded deserializers

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/http-client-python/package.json Updates http-specs dependency to version with enum array test cases
packages/http-client-python/package-lock.json Updates lockfile with new http-specs version and dependency ranges
packages/http-client-python/generator/test/generic_mock_api_tests/test_encode_array.py Adds 8 new test cases for enum and extensible enum array encoding
packages/http-client-python/generator/test/generic_mock_api_tests/asynctests/test_encode_array_async.py Adds async versions of the 8 new enum array encoding test cases
packages/http-client-python/generator/pygen/codegen/templates/model_base.py.jinja2 Refactors deserialization logic to support enum arrays in union types and removes bare except clause
.chronus/changes/copilot-add-test-case-http-client-2026-0-19-7-35-17.md Documents the feature addition in changelog
Files not reviewed (1)
  • packages/http-client-python/package-lock.json: Language not supported

@msyyc msyyc added this pull request to the merge queue Jan 20, 2026
Merged via the queue into main with commit 6af7040 Jan 20, 2026
44 checks passed
@msyyc msyyc deleted the copilot/add-test-case-http-client branch January 20, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:python Issue for the Python client emitter: @typespec/http-client-python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[python] add test case for http-client-python http-client-python CSV encoding for model properties Implementation

4 participants