-
Notifications
You must be signed in to change notification settings - Fork 589
Fix rest documentation for changes to spring-rest-docs #6012
Fix rest documentation for changes to spring-rest-docs #6012
Conversation
Update request-parameters to query-parameters Added optional where applicable Added snippet template to query-parameters and updated template for path-parameters to improve readability. Fixes spring-attic#6008
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this improvement @corneil . Nice work!
@@ -233,15 +233,18 @@ void listTaskExecutions() throws Exception { | |||
|
|||
this.mockMvc.perform( | |||
get("/tasks/executions") | |||
.queryParam("page", "1") | |||
.queryParam("size", "2")) | |||
.queryParam("page", "0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious why the change in page and size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To ensure result has data we needed page=0.
I thought size=10 is a good consistent value across usages.
.queryParam("page", "0") | ||
.queryParam("size", "10") | ||
.queryParam("sort", "END_TIME,desc") | ||
) | ||
.andDo(print()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: We can remove the print() statement. Let's save those for debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed print from all documentation classes.
parameterWithName("size") | ||
.description("The requested page size (optional)")), | ||
.description("The requested page size")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are missing the .optional()
method here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Fixed
@corneil Looks really good. Just a one small correction, one question, and a nitpick |
Fixed missing optional Removed print()
@corneil thanks for the good work and investigation on this! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@corneil thanks for the good work and investigation on this!
Update request-parameters to query-parameters
Added optional where applicable
Added snippet template to query-parameters and updated template for path-parameters to improve readability.
Fixes #6008