swagger-api / swagger-api/swagger-ui
@ApiModelProperty(hidden=true) is not working for boolean type fields
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
I have annotated the below field and not initialized in constructor but it is still showing on swagger ui request object.
springfox version -> 2.9.x
@ApiModelProperty(hidden=true)
private boolean isSomeFlow;
public boolean isSomeFlow(){
return isSomeFlow;
}
public void setSomeFlow(boolean isSomeFlow){
this.isSomeFlow = isSomeFlow;
}
Do we have any workaround for this? @swaggerhub-bot
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report concerns a Java model field annotated with @ApiModelProperty(hidden=true) and its appearance in the Swagger UI request object. Start by reproducing it with springfox 2.9.x, then verify whether the boolean property is omitted from the rendered request object; no repository file or test is identified in the report.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, javascript
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100