New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default "optional" is displayed on all fields on response classes. #1601
Comments
Basically, you'd rather have the required fields labelled as 'required', while having the optional fields not labelled, correct? |
Yes |
I'm confused by what you mean here, are you referring to optional in the model view part? |
Yeah, I think that's what OP is referring to. |
Without explicitly making all the fields as required using the annotation @ApiModelProperty(required = true),
} |
That's a question to swagger-core really, but the answer is no. |
All fields default to optional and you have to explicitly make them required to override the default. Without an option to change the default, we at least need to be able to not display "optional" on every single field, without explicitly marking every field as required. That's the whole point of defaults, you don't have to explicitly state them.
The text was updated successfully, but these errors were encountered: