Skip to content

Commit 336fa8f

Browse files
author
bnasslahsen
committed
code review
1 parent a382dd3 commit 336fa8f

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

springdoc-openapi-data-rest/src/main/java/org/springdoc/data/rest/core/DataRestOperationBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private Operation buildEntityOperation(HandlerMethod handlerMethod, DataRestRepo
143143
Operation operation = initOperation(handlerMethod, domainType, requestMethod);
144144
dataRestRequestBuilder.buildParameters(domainType, openAPI, handlerMethod, requestMethod, methodAttributes, operation, resourceMetadata);
145145
dataRestResponseBuilder.buildEntityResponse(operation, handlerMethod, openAPI, requestMethod, operationPath, domainType, methodAttributes);
146-
tagsBuilder.buildEntityTags(operation, openAPI, handlerMethod, dataRestRepository);
146+
tagsBuilder.buildEntityTags(operation, handlerMethod, dataRestRepository);
147147
if (domainType != null)
148148
addOperationDescription(operation, requestMethod, domainType.getSimpleName().toLowerCase());
149149
return operation;
@@ -192,7 +192,7 @@ private Operation buildSearchOperation(HandlerMethod handlerMethod, DataRestRepo
192192
.ifPresent(methodParameterPage -> dataRestRequestBuilder.buildCommonParameters(domainType, openAPI, requestMethod, methodAttributes, operation, new String[] { methodParameterPage.getParameterName() }, new MethodParameter[] { methodParameterPage }));
193193
}
194194
dataRestResponseBuilder.buildSearchResponse(operation, handlerMethod, openAPI, methodResourceMapping, domainType, methodAttributes);
195-
tagsBuilder.buildSearchTags(operation, openAPI, handlerMethod, dataRestRepository);
195+
tagsBuilder.buildSearchTags(operation, handlerMethod, dataRestRepository);
196196
return operation;
197197
}
198198

springdoc-openapi-data-rest/src/main/java/org/springdoc/data/rest/core/DataRestTagsBuilder.java

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import java.util.HashSet;
2727
import java.util.Set;
2828

29-
import io.swagger.v3.oas.models.OpenAPI;
3029
import io.swagger.v3.oas.models.Operation;
3130
import io.swagger.v3.oas.models.tags.Tag;
3231
import org.springdoc.core.OpenAPIBuilder;
@@ -47,7 +46,7 @@ public class DataRestTagsBuilder {
4746
/**
4847
* The Open api builder.
4948
*/
50-
private OpenAPIBuilder openAPIBuilder;
49+
private final OpenAPIBuilder openAPIBuilder;
5150

5251
/**
5352
* Instantiates a new Data rest tags builder.
@@ -62,37 +61,34 @@ public DataRestTagsBuilder(OpenAPIBuilder openAPIBuilder) {
6261
* Build search tags.
6362
*
6463
* @param operation the operation
65-
* @param openAPI the open api
6664
* @param handlerMethod the handler method
6765
* @param dataRestRepository the repository data rest
6866
*/
69-
public void buildSearchTags(Operation operation, OpenAPI openAPI, HandlerMethod handlerMethod,
67+
public void buildSearchTags(Operation operation, HandlerMethod handlerMethod,
7068
DataRestRepository dataRestRepository) {
71-
buildTags(operation, openAPI, handlerMethod, dataRestRepository);
69+
buildTags(operation, handlerMethod, dataRestRepository);
7270
}
7371

7472
/**
7573
* Build entity tags.
7674
*
7775
* @param operation the operation
78-
* @param openAPI the open api
7976
* @param handlerMethod the handler method
8077
* @param dataRestRepository the repository data rest
8178
*/
82-
public void buildEntityTags(Operation operation, OpenAPI openAPI, HandlerMethod handlerMethod,
79+
public void buildEntityTags(Operation operation, HandlerMethod handlerMethod,
8380
DataRestRepository dataRestRepository) {
84-
buildTags(operation, openAPI, handlerMethod, dataRestRepository);
81+
buildTags(operation, handlerMethod, dataRestRepository);
8582
}
8683

8784
/**
8885
* Build tags.
8986
*
9087
* @param operation the operation
91-
* @param openAPI the open api
9288
* @param handlerMethod the handler method
9389
* @param dataRestRepository the repository data rest
9490
*/
95-
private void buildTags(Operation operation, OpenAPI openAPI, HandlerMethod handlerMethod,
91+
private void buildTags(Operation operation, HandlerMethod handlerMethod,
9692
DataRestRepository dataRestRepository) {
9793
String tagName = handlerMethod.getBeanType().getSimpleName();
9894
if (SpringRepositoryRestResourceProvider.REPOSITORY_SCHEMA_CONTROLLER.equals(handlerMethod.getBeanType().getName())

0 commit comments

Comments
 (0)