question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Swagger generation from controller for /path/{*param} generates param as a query param

See original GitHub issue

Given this controller action:

[Route("path/{*param}")

generates the parameter param as in:query, whereas this controller action:

[Route("path/{param}")

generates the parameter param as in:path.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:16 (15 by maintainers)

github_iconTop GitHub Comments

3reactions
paulomorgadocommented, Jul 14, 2017

What makes sense is for the wildcard only be allowed on the last path parameter and to just not escape it.

I’m using an API Manager (http://wso2.com/products/api-manager) where this route/resource is defined as path1/path2/path3/{id}/* and, in this case, I would like to have a parameter generated for that too.

1reaction
paulomorgadocommented, Oct 14, 2020

Sorry, haven’t worked with this for about 2 years.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Describing Parameters
Each parameter has name , value type (for primitive value parameters) or schema (for request body), and optional description . Here is an...
Read more >
Parameter Serialization
The path parameter id uses the matrix style with the explode modifier, which corresponds to the {;id*} template. The query parameter metadata uses...
Read more >
Swagger generated REST API docs showing query params ...
The @ApiParam annotation will do the trick. From the Swagger documentation: The @ApiParam is used solely with the JAX-RS parameter ...
Read more >
Swagger
The braces tell Swagger that it should substitute the contents of a path param called {slug} into any generated routes (see below for...
Read more >
Types and Parameters - OpenAPI
The SwaggerModule searches for all @Body() , @Query() , and @Param() decorators in route handlers to generate the API document. It also creates...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found