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.

Allow enum in @ApiImplicitParam decorator

See original GitHub issue

I’m submitting a…


[ ] Regression 
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

Now you cannot use enum for path params, is included in query params, so I think would be great to have it on path params

Expected behavior

@ApiImplicitParam({name: 'param', enum: ['val1', 'val2']})

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

You can generate the swagger document, are use a combo box to pill the path param, so would be easier to use it. (cosidering we have constant values for this operation)

Environment


Nest version: 5.0.0

 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rusconcommented, Feb 16, 2019

@didvae ping

0reactions
lock[bot]commented, Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Using @Schema(allowableValues=) for enum param ...
My API has a enum field in request body. When I generate swagger UI, its showing enum with allowed value as enum names....
Read more >
Enums - Swagger
If you use OpenAPI 2.0, see our OpenAPI 2.0 guide. Enums. You can use the enum keyword to specify possible values of a...
Read more >
Swagger Annotations for Rest API Documentation - Java Guides
A wrapper to allow a list of multiple ApiImplicitParam objects. @ApiModel, Provides additional information about Swagger models. @ApiModelProperty, Adds and ...
Read more >
Springfox Reference Documentation - GitHub Pages
This is an extensibility point to extract operations related to entity associations. This extractor is to allow creation of RequestHandler`s ...
Read more >
How to use the @nestjs/swagger.ApiCreatedResponse ... - Snyk
shared/decorators/roles.decorator'; import { UserRole } from '../user/models/user-role.enum'; import { AuthGuard } from '@nestjs/passport'; ...
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