microsoft / microsoft/typespec

Regression from http 1.10.1

Open
#10,064 0 comments 1 reaction 2 assignees Claimed by @timotheeguerin View on GitHub
bug lib:http triaged:core
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

Explicit `/` is now dropped when defined on interface.
When joining with parent routes we seem to drop an explicit trailing `/`. this feels quite like an edge case but this isn't expected

[playground](https://azure.github.io/typespec-azure/playground/?e=%40azure-tools%2Ftypespec-autorest&options=%7B%7D&vs=%7B%7D&version=0.66.x&c=aW1wb3J0ICJAdHlwZXNwZWMvaHR0cCI7Cgp1c2luZyBIdHRwOwoKQHNlcnZpY2UKbmFtZXNwYWNlIFNpbXBsZVN0b3JhZ2XEI3JvdXRlKCJ7YmxvYk5hbWV9LyIpCmludGVyZsQwQmxvYnMgewogIEBwdXTEB8cxP3NvbWUtcXVlcnk9dHJ1ZSIpCiAgcHV0xDEoyE06IHN0cmluZywgQGJvZHkgY29udGVudDogYnl0ZXMpOiB2b2lkOwp9Cg%3D%3D)

```tsp
@route("{blobName}/")
interface Blobs {
// expected: /{blobName}/?some-query=true
// actual: /{blobName}?some-query=true
@put
@route("?some-query=true")
putBlob(blobName: string, @body content: bytes): void;
}
```

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.