Skip to content

Commit 3814cac

Browse files
committed
fix tests - forbidden api issue
1 parent 7bc73e1 commit 3814cac

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/spring/KotlinSpringServerCodegenTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3896,7 +3896,7 @@ public void springPaginatedMixedOperations() throws Exception {
38963896
// Operation without x-spring-paginated should NOT have Pageable
38973897
assertFileContains(petApi.toPath(), "fun addPet(");
38983898
// Verify addPet doesn't have pageable (it has body param only)
3899-
String content = new String(java.nio.file.Files.readAllBytes(petApi.toPath()));
3899+
String content = Files.readString(petApi.toPath());
39003900
String addPetMethod = content.substring(
39013901
content.indexOf("fun addPet("),
39023902
content.indexOf(")", content.indexOf("fun addPet(")) + 1
@@ -3935,8 +3935,8 @@ public void springPaginatedParameterOrdering() throws Exception {
39353935

39363936
// Verify exact parameter ordering: allParams -> request -> pageable
39373937
File petApi = files.get("PetApi.kt");
3938-
String content = new String(java.nio.file.Files.readAllBytes(petApi.toPath()));
3939-
3938+
String content = Files.readString(petApi.toPath());
3939+
39403940
// Find findPetsByStatus method
39413941
int methodStart = content.indexOf("fun findPetsByStatus(");
39423942
int methodEnd = content.indexOf("): ResponseEntity", methodStart);
@@ -3964,8 +3964,8 @@ public void springPaginatedDelegateCallPassesPageable() throws Exception {
39643964

39653965
// Verify that interface method calls delegate with pageable parameter
39663966
File petApi = files.get("PetApi.kt");
3967-
String content = new String(java.nio.file.Files.readAllBytes(petApi.toPath()));
3968-
3967+
String content = Files.readString(petApi.toPath());
3968+
39693969
// Check for delegate call pattern with pageable
39703970
if (content.contains("getDelegate().findPetsByStatus")) {
39713971
assertFileContains(petApi.toPath(), "getDelegate().findPetsByStatus(");

0 commit comments

Comments
 (0)