Skip to content

Commit

Permalink
Remove leftover from builder pattern branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfinne committed Apr 23, 2024
1 parent a7c5d2a commit efa2dc4
Show file tree
Hide file tree
Showing 108 changed files with 145 additions and 4,395 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ public void processOpts() {
});
}

private void setGeneratedConstructorWithAllArgs(boolean aValue) {
public void setGeneratedConstructorWithAllArgs(boolean aValue) {
this.generatedConstructorWithAllArgs = aValue;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import io.swagger.v3.oas.models.PathItem;
import io.swagger.v3.oas.models.media.MediaType;
import io.swagger.v3.oas.models.media.Schema;
import io.swagger.v3.oas.models.parameters.Parameter;
import io.swagger.v3.oas.models.servers.Server;
import io.swagger.v3.oas.models.tags.Tag;
import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,4 @@ public class {{classname}} {{#parent}}extends {{{.}}}{{/parent}}{{#vendorExtensi
}
return o.toString().replace("\n", "\n ");
}
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,16 @@

import junit.framework.AssertionFailedError;
import lombok.SneakyThrows;
import org.openapitools.codegen.*;
import org.openapitools.codegen.ClientOptInput;
import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.CodegenModel;
import org.openapitools.codegen.CodegenOperation;
import org.openapitools.codegen.CodegenParameter;
import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.CodegenResponse;
import org.openapitools.codegen.CodegenSecurity;
import org.openapitools.codegen.DefaultGenerator;
import org.openapitools.codegen.TestUtils;
import org.openapitools.codegen.config.CodegenConfigurator;
import org.openapitools.codegen.java.assertions.JavaFileAssert;
import org.openapitools.codegen.languages.AbstractJavaCodegen;
Expand Down Expand Up @@ -1891,38 +1900,6 @@ public void testMicroprofileGenerateCorrectJsonbCreator_issue12622() throws Exce
.containsWithNameAndAttributes("JsonbProperty", ImmutableMap.of("value", "\"c\""));
}

@Test
public void testMicroprofileGenerateCorrectJacksonGenerator_issue18336() throws Exception {
Map<String, Object> properties = new HashMap<>();
properties.put(JavaClientCodegen.MICROPROFILE_REST_CLIENT_VERSION, "3.0");
properties.put(CodegenConstants.SERIALIZATION_LIBRARY, JavaClientCodegen.SERIALIZATION_LIBRARY_JACKSON);

File output = Files.createTempDirectory("test").toFile();
output.deleteOnExit();

final CodegenConfigurator configurator = new CodegenConfigurator()

.setAdditionalProperties(properties)
.setGeneratorName("java")
.setLibrary(JavaClientCodegen.MICROPROFILE)
.setInputSpec("src/test/resources/bugs/issue_18336.yaml")
.setOutputDir(output.getAbsolutePath().replace("\\", "/"));

final ClientOptInput clientOptInput = configurator.toClientOptInput();
DefaultGenerator generator = new DefaultGenerator();
Map<String, File> files = generator.opts(clientOptInput).generate().stream()
.collect(Collectors.toMap(File::getName, Function.identity()));

JavaFileAssert.assertThat(files.get("Pet.java"))
.assertConstructor("String")
.assertConstructorAnnotations()
.containsWithName("JsonCreator")
.toConstructor()
.hasParameter("name")
.assertParameterAnnotations()
.containsWithNameAndAttributes("JsonProperty", ImmutableMap.of("value", "JSON_PROPERTY_NAME", "required", "true"));
}

@Test
public void testJavaClientDefaultValues_issueNoNumber() throws Exception {
Map<String, Object> properties = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,18 @@
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;

import org.apache.commons.lang3.StringUtils;
import org.assertj.core.api.MapAssert;
import org.openapitools.codegen.*;
import org.openapitools.codegen.CliOption;
import org.openapitools.codegen.ClientOptInput;
import org.openapitools.codegen.CodegenConstants;
import org.openapitools.codegen.CodegenModel;
import org.openapitools.codegen.CodegenOperation;
import org.openapitools.codegen.CodegenParameter;
import org.openapitools.codegen.CodegenProperty;
import org.openapitools.codegen.DefaultGenerator;
import org.openapitools.codegen.SupportingFile;
import org.openapitools.codegen.TestUtils;
import org.openapitools.codegen.config.CodegenConfigurator;
import org.openapitools.codegen.config.GlobalSettings;
import org.openapitools.codegen.java.assertions.JavaFileAssert;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ docs/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md
docs/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md
git_push.sh
phpunit.xml.dist
src/ApiException.php
src/Api/AuthApi.php
src/Api/BodyApi.php
src/Api/FormApi.php
src/Api/HeaderApi.php
src/Api/PathApi.php
src/Api/QueryApi.php
src/ApiException.php
src/Configuration.php
src/HeaderSelector.php
src/Model/Bird.php
Expand Down
4 changes: 2 additions & 2 deletions samples/client/echo_api/php-nextgen/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src\/Api</directory>
<directory suffix=".php">./src\/Model</directory>
<directory suffix=".php">./src/Api</directory>
<directory suffix=".php">./src/Model</directory>
</include>
</coverage>
<testsuites>
Expand Down
2 changes: 1 addition & 1 deletion samples/client/echo_api/r/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
.travis.yml
DESCRIPTION
NAMESPACE
README.md
R/api_client.R
R/api_response.R
R/auth_api.R
Expand All @@ -26,6 +25,7 @@ R/tag.R
R/test_form_object_multipart_request_marker.R
R/test_query_style_deep_object_explode_true_object_all_of_query_object_parameter.R
R/test_query_style_form_explode_true_array_string_query_object_parameter.R
README.md
docs/AuthApi.md
docs/Bird.md
docs/BodyApi.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
.travis.yml
DESCRIPTION
NAMESPACE
README.md
R/allof_tag_api_response.R
R/animal.R
R/any_of_pig.R
Expand Down Expand Up @@ -40,6 +39,7 @@ R/user.R
R/user_api.R
R/whale.R
R/zebra.R
README.md
docs/AllofTagApiResponse.md
docs/Animal.md
docs/AnyOfPig.md
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/R-httr2/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
.travis.yml
DESCRIPTION
NAMESPACE
README.md
R/allof_tag_api_response.R
R/animal.R
R/any_of_pig.R
Expand Down Expand Up @@ -39,6 +38,7 @@ R/user.R
R/user_api.R
R/whale.R
R/zebra.R
README.md
docs/AllofTagApiResponse.md
docs/Animal.md
docs/AnyOfPig.md
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/R/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
.travis.yml
DESCRIPTION
NAMESPACE
README.md
R/allof_tag_api_response.R
R/animal.R
R/any_of_pig.R
Expand Down Expand Up @@ -39,6 +38,7 @@ R/user.R
R/user_api.R
R/whale.R
R/zebra.R
README.md
docs/AllofTagApiResponse.md
docs/Animal.md
docs/AnyOfPig.md
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -293,3 +293,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -323,3 +323,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -320,3 +320,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -268,3 +268,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -290,3 +290,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -295,3 +295,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,4 @@ private static String toIndentedString(Object o) {
return o.toString().replace("\n", "\n ");
}
}

Loading

0 comments on commit efa2dc4

Please sign in to comment.