Skip to content

Commit

Permalink
MediaType "loginRequestBody" should be "application/json". Fixes #1365.
Browse files Browse the repository at this point in the history
  • Loading branch information
bnasslahsen committed Dec 11, 2021
1 parent 81ba589 commit 44eefd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ OpenApiCustomiser springSecurityLoginEndpointCustomiser(ApplicationContext appli
Schema<?> schema = new ObjectSchema()
.addProperties(usernamePasswordAuthenticationFilter.getUsernameParameter(), new StringSchema())
.addProperties(usernamePasswordAuthenticationFilter.getPasswordParameter(), new StringSchema());
RequestBody requestBody = new RequestBody().content(new Content().addMediaType("loginRequestBody", new MediaType().schema(schema)));
RequestBody requestBody = new RequestBody().content(new Content().addMediaType(org.springframework.http.MediaType.APPLICATION_JSON_VALUE, new MediaType().schema(schema)));
operation.requestBody(requestBody);
ApiResponses apiResponses = new ApiResponses();
apiResponses.addApiResponse(String.valueOf(HttpStatus.OK.value()), new ApiResponse().description(HttpStatus.OK.getReasonPhrase()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
],
"requestBody": {
"content": {
"loginRequestBody": {
"application/json": {
"schema": {
"type": "object",
"properties": {
Expand Down

0 comments on commit 44eefd5

Please sign in to comment.