swagger-api / swagger-api/swagger-ui

@ApiModelProperty(hidden=true) is not working for boolean type fields

Open
#7,934 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.