microsoft / microsoft/typespec

[http-client-python] for no specific route http ops can we not put "/" in _url?

Open
#10,010 2 comments 0 reactions 1 assignee Claimed by @msyyc View on GitHub
emitter:client:python
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

for the following get/post/delete operations they are being differentiated by a "/" in the openapi spec

https://typespec.io/playground/?options=%7B%22linterRuleSet%22%3A%7B%22extends%22%3A%5B%22%40typespec%2Fhttp%2Fall%22%5D%7D%7D&c=aW1wb3J0ICJAdHlwZXNwZWMvaHR0cCI7Cgp1c2luZyBIdHRwOwpAc2VydmljZSgjeyB0aXRsZTogIldpZGdldCBTxhoiIH0pCm5hbWVzcGFjZSBEZW1vxxo7Cgptb2RlbCDHMXsKICBAdmlzaWJpbGl0eShMaWZlY3ljbGUuUmVhZCkKICBpZDogc3RyaW5nOwoKICB3ZWlnaHQ6IGludDMyOwogIGNvbG9yOiAicmVkIiB8ICJibHVlIjsKfQoKQGVycm9yx3BFxAzFb2NvZGXLQG1lc3NhZ2XKZcQ6dGFnKOcA1HMiKQppbnRlcmbkAMvHFMVJLyoqIExpc3Qgd8cVKi%2FkAM7kANdsaXN0KCk6xy9bXSB85gCB5QDDxDhDcmVhdGUgYcc8xztwb3N0IGPFGyhAYm9keccfyEnJUtFQVXBk1FBhdGNoIHXFHCjEDmjlAU%2FGRC5pZCwgzmZNZXJnZVDENcZQPMYqPtp4RGVsZdJ4ZMYWxgfUeSk6IHZvaWTKT8ZOQW5hbHl60U9yb3V0ZSgie2lkfS9hxiMiKecBLscQ12XmAdTKZ30K&e=%40typespec%2Fopenapi3&vs=%7B%7D

in python we translate that to `_url="/"`

Do we need the "/"? Would we expect HttpRequest() call in the builder operations to add a "/" at the end if param options are appended to the url?

This is causing the following for storage:

E Uri doesn't match:
E request
E record

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.