Skip to content

Commit 130506a

Browse files
committed
code review
1 parent d0710e6 commit 130506a

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

.java-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
17.0

springdoc-openapi-common/src/main/java/org/springdoc/api/AbstractOpenApiResource.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848

4949
import com.fasterxml.jackson.annotation.JsonView;
5050
import com.fasterxml.jackson.core.JsonProcessingException;
51-
import com.fasterxml.jackson.core.type.TypeReference;
5251
import com.fasterxml.jackson.databind.ObjectMapper;
5352
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
5453
import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator.Feature;
@@ -66,7 +65,6 @@
6665
import io.swagger.v3.oas.models.media.StringSchema;
6766
import io.swagger.v3.oas.models.parameters.Parameter;
6867
import io.swagger.v3.oas.models.responses.ApiResponses;
69-
import io.swagger.v3.oas.models.servers.Server;
7068
import org.apache.commons.lang3.ArrayUtils;
7169
import org.apache.commons.lang3.StringUtils;
7270
import org.slf4j.Logger;
@@ -379,7 +377,7 @@ protected synchronized OpenAPI getOpenApi(Locale locale) {
379377
protected void calculatePath(HandlerMethod handlerMethod,
380378
RouterOperation routerOperation, Locale locale, OpenAPI openAPI) {
381379

382-
routerOperation = customiseRouterOperation(routerOperation, handlerMethod);
380+
routerOperation = customizeRouterOperation(routerOperation, handlerMethod);
383381

384382
String operationPath = routerOperation.getPath();
385383
Set<RequestMethod> requestMethods = new HashSet<>(Arrays.asList(routerOperation.getMethods()));
@@ -481,7 +479,7 @@ protected void calculatePath(HandlerMethod handlerMethod,
481479
buildCallbacks(openAPI, methodAttributes, operation, apiCallbacks);
482480

483481
// allow for customisation
484-
operation = customiseOperation(operation, handlerMethod);
482+
operation = customizeOperation(operation, handlerMethod);
485483

486484
PathItem pathItemObject = buildPathItem(requestMethod, operation, operationPath, paths);
487485
paths.addPathItem(operationPath, pathItemObject);
@@ -842,7 +840,7 @@ protected Set<RequestMethod> getDefaultAllowedHttpMethods() {
842840
* @param handlerMethod the handler method
843841
* @return the operation
844842
*/
845-
protected Operation customiseOperation(Operation operation, HandlerMethod handlerMethod) {
843+
protected Operation customizeOperation(Operation operation, HandlerMethod handlerMethod) {
846844
if (operationCustomizers.isPresent()) {
847845
List<OperationCustomizer> operationCustomizerList = operationCustomizers.get();
848846
for (OperationCustomizer operationCustomizer : operationCustomizerList)
@@ -857,7 +855,7 @@ protected Operation customiseOperation(Operation operation, HandlerMethod handle
857855
* @param handlerMethod
858856
* @return the router operation
859857
*/
860-
protected RouterOperation customiseRouterOperation(RouterOperation routerOperation, HandlerMethod handlerMethod) {
858+
protected RouterOperation customizeRouterOperation(RouterOperation routerOperation, HandlerMethod handlerMethod) {
861859
if (routerOperationCustomizers.isPresent()) {
862860
List<RouterOperationCustomizer> routerOperationCustomizerList = routerOperationCustomizers.get();
863861
for (RouterOperationCustomizer routerOperationCustomizer : routerOperationCustomizerList) {

springdoc-openapi-common/src/main/java/org/springdoc/core/annotations/RouterOperation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*
4040
* @author bnasslahsen
4141
*/
42-
@Target({ ElementType.TYPE, ElementType.METHOD })
42+
@Target({ ElementType.TYPE, ElementType.METHOD})
4343
@Retention(RetentionPolicy.RUNTIME)
4444
@Inherited
4545
public @interface RouterOperation {

0 commit comments

Comments
 (0)