Skip to content

Commit f40f790

Browse files
committed
Revert "feat: ability to skip license header in generated files"
This reverts commit 8f0ff49.
1 parent 8f0ff49 commit f40f790

8 files changed

Lines changed: 0 additions & 18 deletions

File tree

docs/generators/elixir.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2727
|licenseHeader|The license header to prepend to the top of all source files.| |null|
2828
|packageName|Elixir package name (convention: lowercase).| |null|
2929
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
30-
|skipLicenseHeader|Skip the license header in the generated files.| |false|
3130
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |true|
3231
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
3332

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ElixirClientCodegen.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,6 @@ public ElixirClientCodegen() {
235235
"The main namespace to use for all classes. e.g. Yay.Pets"));
236236
cliOptions.add(new CliOption("licenseHeader", "The license header to prepend to the top of all source files."));
237237
cliOptions.add(new CliOption(CodegenConstants.PACKAGE_NAME, "Elixir package name (convention: lowercase)."));
238-
cliOptions.add(new CliOption("skipLicenseHeader", "Skip the license header in the generated files.").defaultValue(Boolean.FALSE.toString()));
239238
}
240239

241240
/**
@@ -310,10 +309,6 @@ public void execute(Template.Fragment fragment, Writer writer) throws IOExceptio
310309
if (additionalProperties.containsKey(CodegenConstants.PACKAGE_VERSION)) {
311310
setPackageVersion((String) additionalProperties.get(CodegenConstants.PACKAGE_VERSION));
312311
}
313-
if (additionalProperties.containsKey("skipLicenseHeader")) {
314-
boolean skipLicenseHeader = Boolean.parseBoolean(additionalProperties.get("skipLicenseHeader").toString());
315-
additionalProperties.put("skipLicenseHeader", skipLicenseHeader);
316-
}
317312
additionalProperties.put(CodegenConstants.PACKAGE_VERSION, packageVersion);
318313
}
319314

modules/openapi-generator/src/main/resources/elixir/api.mustache

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
{{^skipLicenseHeader}}
21
{{>licenseInfo}}
3-
{{/skipLicenseHeader}}
42
defmodule {{moduleName}}.Api.{{classname}} do
53
@moduledoc """
64
API calls for all endpoints tagged `{{baseName}}`.

modules/openapi-generator/src/main/resources/elixir/connection.ex.mustache

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
{{^skipLicenseHeader}}
21
{{>licenseInfo}}
3-
{{/skipLicenseHeader}}
42
defmodule {{moduleName}}.Connection do
53
@moduledoc """
64
Handle Tesla connections for {{moduleName}}.

modules/openapi-generator/src/main/resources/elixir/deserializer.ex.mustache

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
{{^skipLicenseHeader}}
21
{{>licenseInfo}}
3-
{{/skipLicenseHeader}}
42
defmodule {{moduleName}}.Deserializer do
53
@moduledoc """
64
Helper functions for deserializing responses into models

modules/openapi-generator/src/main/resources/elixir/model.mustache

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
{{^skipLicenseHeader}}
21
{{>licenseInfo}}
3-
{{/skipLicenseHeader}}
42
{{#models}}{{#model}}defmodule {{moduleName}}.Model.{{classname}} do
53
@moduledoc """
64
{{&description}}

modules/openapi-generator/src/main/resources/elixir/request_builder.ex.mustache

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
{{^skipLicenseHeader}}
21
{{>licenseInfo}}
3-
{{/skipLicenseHeader}}
42
defmodule {{moduleName}}.RequestBuilder do
53
@moduledoc """
64
Helper functions for building Tesla requests

modules/openapi-generator/src/test/java/org/openapitools/codegen/options/ElixirClientOptionsProvider.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public class ElixirClientOptionsProvider implements OptionsProvider {
2626
public static final String INVOKER_PACKAGE_VALUE = "Yay.Pets";
2727
public static final String PREPEND_FORM_OR_BODY_PARAMETERS_VALUE = "true";
2828
public static final String ENUM_UNKNOWN_DEFAULT_CASE_VALUE = "false";
29-
public static final String SKIP_LICENSE_HEADER_VALUE = "false";
3029

3130
@Override
3231
public String getLanguage() {
@@ -48,7 +47,6 @@ public Map<String, String> createOptions() {
4847
.put(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "true")
4948
.put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true")
5049
.put(CodegenConstants.ENUM_UNKNOWN_DEFAULT_CASE, ENUM_UNKNOWN_DEFAULT_CASE_VALUE)
51-
.put("skipLicenseHeader", SKIP_LICENSE_HEADER_VALUE)
5250
.build();
5351
}
5452

0 commit comments

Comments
 (0)