From 7dbabe51cd9966276c76a7238989d178f75152e7 Mon Sep 17 00:00:00 2001 From: Nathan Byrd Date: Thu, 26 Dec 2024 16:34:45 +0000 Subject: [PATCH] Fixed modsecurity base test --- .gitignore | 2 ++ .../generators/modsecurity3/Modsecurity3GeneratorTest.java | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 85ea548..64a3392 100644 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,5 @@ logs/ .Trashes ehthumbs.db Thumbs.db + +output/ \ No newline at end of file diff --git a/src/test/java/com/oashield/openapi/generators/modsecurity3/Modsecurity3GeneratorTest.java b/src/test/java/com/oashield/openapi/generators/modsecurity3/Modsecurity3GeneratorTest.java index 11dec94..02c2454 100644 --- a/src/test/java/com/oashield/openapi/generators/modsecurity3/Modsecurity3GeneratorTest.java +++ b/src/test/java/com/oashield/openapi/generators/modsecurity3/Modsecurity3GeneratorTest.java @@ -25,9 +25,10 @@ public void launchCodeGenerator() { // https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java final CodegenConfigurator configurator = new CodegenConfigurator() .setGeneratorName("modsecurity3") // use this codegen library - .setInputSpec("../../../modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // sample OpenAPI file - // .setInputSpec("https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // or from the server - .setOutputDir("out/modsecurity3"); // output directory + //.setInputSpec("../../../../../../samples/petstore.yaml") // sample OpenAPI file + //.setInputSpec("https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml") // or from the server + .setInputSpec("samples/petstore.yaml") + .setOutputDir("output/modsecurity3"); // output directory final ClientOptInput clientOptInput = configurator.toClientOptInput(); DefaultGenerator generator = new DefaultGenerator();