-
-
Notifications
You must be signed in to change notification settings - Fork 525
Example value for some methods is not presented properly in 2.4.0 #2548
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
Comments
Just noticed the same bug, all POSTs are affected. PUT, PATCH and GET are fine. |
I noticed this issue as well. Additional info:
The api-docs JSON is semantically the same. Not sure if this is related to #2538. I cannot override library version as said. |
Try using The latest SNAPSHOT where the swagger-ui has been upgraded. |
@bnasslahsen I could confirm that bug is fixed in snapshot version. |
@bnasslahsen Sorry to jump here in the discussion, is there a plan for a release soon? |
Hopefully by the end of the month |
@bnasslahsen Great, looking forward to it! |
Describe the bug
To Reproduce
Steps to reproduce the behavior:
More details
@PostMapping(value = "/authenticate") public ResponseEntity<AuthenticateResponse> authenticate(HttpServletRequest request, @RequestBody AuthenticateRequest authenticateRequest) { AuthenticateResponse authenticateResponse = authService.authenticate(authenticateRequest, httpRequestUtil.getClientIP(request)); return new ResponseEntity<>(authenticateResponse, HttpStatus.OK); }
@Getter @Setter @NoArgsConstructor @AllArgsConstructor @Builder public class AuthenticateRequest { private String ou; private String username; private String password; private TokenGrantType grantType; private String refreshToken; }
On swagger page schema for request body is presented properly:
but example value is dummy "string":
With springdoc-openapi version 2.3.0 example value is presented as a valid json object:

Surprisingly, I have same issue with all rest methods within one controller file. Methods from another controller files has valid examples for request body's.
The text was updated successfully, but these errors were encountered: