Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,13 @@ public enum DeclarativeInterfaceReactiveMode {
}
}


@Getter
public enum RequestMappingMode {
api_interface("Generate the @RequestMapping annotation on the generated Api Interface."),
controller("Generate the @RequestMapping annotation on the generated Api Controller Implementation."),
none("Do not add a class level @RequestMapping annotation.");

public String getDescription() {
return description;
}

private String description;
private final String description;

RequestMappingMode(String description) {
this.description = description;
Expand Down Expand Up @@ -196,13 +192,15 @@ public String getDescription() {
protected boolean useSpringBoot4 = false;
@Getter @Setter
protected boolean useSpringBuiltInValidation = false;
@Setter
@Getter
protected RequestMappingMode requestMappingMode = RequestMappingMode.controller;
private DocumentationProvider documentationProvider;
private AnnotationLibrary annotationLibrary;

// Map to track which models implement which sealed response interfaces
private Map<String, List<String>> modelToSealedInterfaces = new HashMap<>();
private Map<String, String> sealedInterfaceToOperationId = new HashMap<>();
private final Map<String, List<String>> modelToSealedInterfaces = new HashMap<>();
private final Map<String, String> sealedInterfaceToOperationId = new HashMap<>();
private boolean sealedInterfacesFileWritten = false;

// Map from schema name to detected paged-model info (populated when substituteGenericPagedModel=true)
Expand Down Expand Up @@ -1128,8 +1126,7 @@ public CodegenOperation fromOperation(String path, String httpMethod, Operation
// Run through toModelName so that schemaMappings (e.g. User → com.example.MyUser)
// are honored: the mapped name is used both in the type arg and for import resolution.
String itemType = toModelName(detected.itemSchemaName);
String newBaseType = pagedModelClassName + "<" + itemType + ">";
codegenOperation.returnType = newBaseType;
codegenOperation.returnType = pagedModelClassName + "<" + itemType + ">";
codegenOperation.returnBaseType = pagedModelClassName;
// Clear any container flag — PagedModel is not itself a List/array
codegenOperation.returnContainer = null;
Expand Down Expand Up @@ -1872,14 +1869,6 @@ protected boolean needToImport(String type) {
return !type.startsWith("org.springframework.") && super.needToImport(type);
}

public RequestMappingMode getRequestMappingMode() {
return requestMappingMode;
}

public void setRequestMappingMode(RequestMappingMode requestMappingMode) {
this.requestMappingMode = requestMappingMode;
}

@Override
public List<VendorExtension> getSupportedVendorExtensions() {
List<VendorExtension> extensions = super.getSupportedVendorExtensions();
Expand Down
Loading