Error: Duplicate path parameter definition signature found in controller...
See original GitHub issueThe new version throws an error, which I can not exactly figure out:
Generate routes error.
Error: Duplicate path parameter definition signature found in controller SitemapController at [method GET getJobsSitemap, getLpSitemap, getLpSitemapIndex], JobfeedController at [method GET getJobFeedsPrioBranch, getJobFeedsPrioDefault, getJobFeedsBranchRegion, getJobFeedsBranch, getJobFeedsDefault]
We have methods like this:
@Get('/jobprio-{page}-{prio}-{branch}.{format}')
public async getJobFeedsPrioBranch(
@Request() req: express.Request,
@Path('page') page: string,
@Path('format') format: JobfeedOutputs, // 'xml' | 'csv' | 'json',
@Path('prio') prio?: JobPrioLevel | '0',
@Path('branch') branch?: string,
@Query('utm_campaign') utm_campaign?: string,
@Query('utm_source') utm_source?: string,
@Query('utm_medium') utm_medium?: string
)
@Get('/jobprio-{page}-{prio}.{format}')
public async getJobFeedsPrioDefault(
@Request() req: express.Request,
@Path('page') page: string,
@Path('format') format: JobfeedOutputs, // 'xml' | 'csv' | 'json',
@Path('prio') prio?: JobPrioLevel | '0',
@Query('utm_campaign') utm_campaign?: string,
@Query('utm_source') utm_source?: string,
@Query('utm_medium') utm_medium?: string
)
this worked before, and should still work right?
Sorting
-
I’m submitting a …
- bug report
- feature request
- support request
-
I confirm that I
- used the search to make sure that a similar issue hasn’t already been submit
Expected Behavior
the routes should be computed correctly.
Current Behavior
throws error
Possible Solution
not quite sure yet where the error is coming from…maybe from the path parameters?
Steps to Reproduce
add two methods with different dynamic path paramters. (see example above)
Context (Environment)
Version of the library: 3.5.0 Version of NodeJS: 15.2.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
This got introduced in https://github.com/lukeautry/tsoa/pull/829
It seems my case has just not been covered. @jackey8616 do you have an idea how we could solve this nicely?
Ah great, you changed it to a warning. Like that too, if you find time please also check my PR, it improves the detection and makes it more bullet proof 😃