Skip to content

feat(http-client-python): add mock API tests for reserved operation body param names#10534

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-test-case-for-pull-10529
Draft

feat(http-client-python): add mock API tests for reserved operation body param names#10534
Copilot wants to merge 2 commits intomainfrom
copilot/add-test-case-for-pull-10529

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 28, 2026

Adds Python SDK mock API test coverage for the SpecialWords_ReservedOperationBodyParams_withItems scenario — verifying that an operation parameter named items (a Python Mapping protocol method) is serialized as "items" on the wire, not mangled to "items_property".

Changes

  • package.json: Bumps @typespec/http-specs from 0.1.0-alpha.360.1.0-alpha.37-dev.4, the first published version containing the new scenario
  • mock_api/azure/test_special_words.py + mock_api/unbranded/test_special_words.py: Adds test_reserved_operation_body_params_with_items (sync)
  • mock_api/azure/asynctests/test_special_words_async.py + mock_api/unbranded/asynctests/test_special_words_async.py: Adds async counterpart
def test_reserved_operation_body_params_with_items(client: SpecialWordsClient):
    client.reserved_operation_body_params.with_items(items=["item"])

The mock expects POST /special-words/operations/body-param-reserved with body {"items": ["item"]} → 204.

@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 Apr 28, 2026
Copilot AI changed the title [WIP] Add test case for pull request 10529 feat(http-client-python): add mock API tests for reserved operation body param names Apr 28, 2026
Copilot AI requested a review from msyyc April 28, 2026 23:13
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 https://github.com/microsoft/typespec/pull/10529

2 participants