Remove unused method (#17042)

This commit is contained in:
Beppe Catanese 2023-11-12 16:10:15 +01:00 committed by GitHub
parent 40b1d37368
commit 2b9ee8c5f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 25 deletions

View File

@ -505,17 +505,6 @@ public class PostmanCollectionCodegen extends DefaultCodegen implements CodegenC
return input.replace("\"", "\\\"");
}
public String doubleCurlyBraces(String str) {
// remove doublebraces first
String s = str.replace("{{", "{").replace("}}", "}");
// change all singlebraces to doublebraces
s = s.replace("{", "{{").replace("}", "}}");
return s;
}
// convert path from /users/{id} to /users/:id
String replacesBracesInPath(String path) {

View File

@ -364,20 +364,6 @@ public class PostmanCollectionCodegenTest {
assertFileNotContains(path, "\"auth\": { \"type\": \"apikey\", \"apikey\": [");
}
@Test
public void doubleCurlyBraces() {
String str = "/api/{var}/archive";
assertEquals("/api/{{var}}/archive", new PostmanCollectionCodegen().doubleCurlyBraces(str));
}
@Test
public void doubleCurlyBracesNoChanges() {
String str = "/api/{{var}}/archive";
assertEquals("/api/{{var}}/archive", new PostmanCollectionCodegen().doubleCurlyBraces(str));
}
@Test
public void extractExampleByName() {
String str = "#/components/examples/get-user-basic";