mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-03-10 08:31:23 +00:00
fix KotlinServerCodegenTest and PostmanCollectionCodegenTest (#18019)
* fix KotlinServerCodegenTest and PostmanCollectionCodegenTest * fix PostmanCollectionCodegen line endings
This commit is contained in:
@@ -715,6 +715,8 @@ public class PostmanCollectionCodegen extends DefaultCodegen implements CodegenC
|
||||
JsonNode actualObj = objectMapper.readTree(json);
|
||||
json = Json.pretty(actualObj);
|
||||
json = json.replace("\"", JSON_ESCAPE_DOUBLE_QUOTE);
|
||||
json = json.replace("\r\n", JSON_ESCAPE_NEW_LINE);
|
||||
json = json.replace("\r", JSON_ESCAPE_NEW_LINE);
|
||||
json = json.replace("\n", JSON_ESCAPE_NEW_LINE);
|
||||
|
||||
} catch (JsonProcessingException e) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package org.openapitools.codegen.kotlin;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.openapitools.codegen.ClientOptInput;
|
||||
import org.openapitools.codegen.DefaultGenerator;
|
||||
import org.openapitools.codegen.TestUtils;
|
||||
import org.openapitools.codegen.languages.KotlinServerCodegen;
|
||||
import org.openapitools.codegen.languages.KotlinSpringServerCodegen;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -180,7 +180,7 @@ public class KotlinServerCodegenTest {
|
||||
.config(codegen))
|
||||
.generate();
|
||||
|
||||
String outputPath = output.getAbsolutePath() + "src/main/kotlin/org/openapitools";
|
||||
String outputPath = output.getAbsolutePath() + "/src/main/kotlin/org/openapitools";
|
||||
Path order = Paths.get(outputPath + "/model/Order.kt");
|
||||
assertFileContains(
|
||||
order,
|
||||
|
||||
@@ -6,10 +6,10 @@ import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import io.swagger.v3.oas.models.tags.Tag;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import org.openapitools.codegen.*;
|
||||
import org.openapitools.codegen.config.CodegenConfigurator;
|
||||
import org.openapitools.codegen.languages.PostmanCollectionCodegen;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user