[Topic] Attribute doesn't support dynamic routes
- Dominant language
- C#
- Stars
- 1.2k
- Forks
- 378
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 6
Description
Currently the **[Topic]** cant be used if the route contains a dynamic part.
A example here is a version in the route.
**Example dynamic route:**
```csharp
[ApiController]
[ApiVersion("1.0")]
[Route("api/v{v:apiVersion}/example]
public class ExampleController : ControllerBase
{
[HttpPost()]
[Topic("messagebus", "topic")
public async Task PubSub([FromBody] object message)
{
...
}
}
```
**Example static route:**
```csharp
[ApiController]
[Route("api/v1.0/example]
public class ExampleController : ControllerBase
{
[HttpPost()]
[Topic("messagebus", "topic")
public async Task PubSub([FromBody] object message)
{
...
}
}
```
Is their a specific reason why the dynamic routes aren't supported?
Contributor guide
Assessment
This issue has not been assessed yet.