mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-12 00:21:18 +00:00
Merge remote-tracking branch 'origin/4.3.x' into 5.0.x
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -30,19 +30,24 @@ import org.slf4j.LoggerFactory;
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static org.apache.commons.lang3.StringEscapeUtils.escapeHtml4;
|
||||
import static org.apache.commons.lang3.StringUtils.isEmpty;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@Command(name = "config-help", description = "Config help for chosen lang")
|
||||
public class ConfigHelp implements Runnable {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(Generate.class);
|
||||
|
||||
public static final String FORMAT_TEXT = "text";
|
||||
public static final String FORMAT_MARKDOWN = "markdown";
|
||||
public static final String FORMAT_YAMLSAMPLE = "yamlsample";
|
||||
private static final String FORMAT_TEXT = "text";
|
||||
private static final String FORMAT_MARKDOWN = "markdown";
|
||||
private static final String FORMAT_YAMLSAMPLE = "yamlsample";
|
||||
|
||||
@Option(name = {"-g",
|
||||
"--generator-name"}, title = "generator name", description = "generator to get config help for")
|
||||
@@ -61,18 +66,41 @@ public class ConfigHelp implements Runnable {
|
||||
FORMAT_TEXT, FORMAT_MARKDOWN, FORMAT_YAMLSAMPLE})
|
||||
private String format;
|
||||
|
||||
@Option(name = {"--import-mappings"}, title = "import mappings", description = "displays the default import mappings (types and aliases, and what imports they will pull into the template)")
|
||||
private Boolean importMappings;
|
||||
|
||||
@Option(name = {"--language-specific-primitive"}, title = "language specific primitives", description = "displays the language specific primitives (types which require no additional imports, or which may conflict with user defined model names)")
|
||||
private Boolean languageSpecificPrimitives;
|
||||
|
||||
@Option(name = {"--reserved-words"}, title = "language specific reserved words", description = "displays the reserved words which may result in renamed model or property names")
|
||||
private Boolean reservedWords;
|
||||
|
||||
@Option(name = {"--instantiation-types"}, title = "instantiation types", description = "displays types used to instantiate simple type/alias names")
|
||||
private Boolean instantiationTypes;
|
||||
|
||||
@Option(name = {
|
||||
"--markdown-header"}, title = "markdown header", description = "When format=markdown, include this option to write out markdown headers (e.g. for docusaurus).")
|
||||
private Boolean markdownHeader;
|
||||
|
||||
@Option(name = {"--full-details"}, title = "full generator details", description = "displays CLI options as well as other configs/mappings (implies --instantiation-types, --reserved-words, --language-specific-primitives, --import-mappings, --supporting-files)")
|
||||
private Boolean fullDetails;
|
||||
|
||||
private String newline = System.lineSeparator();
|
||||
|
||||
@Override public void run() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (isEmpty(generatorName)) {
|
||||
LOGGER.error("[error] A generator name (--generator-name / -g) is required.");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
if (Boolean.TRUE.equals(fullDetails)) {
|
||||
instantiationTypes = Boolean.TRUE;
|
||||
reservedWords = Boolean.TRUE;
|
||||
languageSpecificPrimitives = Boolean.TRUE;
|
||||
importMappings = Boolean.TRUE;
|
||||
}
|
||||
|
||||
try {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
CodegenConfig config = CodegenConfigLoader.forName(generatorName);
|
||||
@@ -97,9 +125,9 @@ public class ConfigHelp implements Runnable {
|
||||
|
||||
if (!isEmpty(outputFile)) {
|
||||
File out = Paths.get(outputFile).toFile();
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
File parentFolder = out.getParentFile();
|
||||
if (parentFolder != null && parentFolder.isDirectory()) {
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
parentFolder.mkdirs();
|
||||
}
|
||||
|
||||
@@ -119,6 +147,135 @@ public class ConfigHelp implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
private void generateMarkdownHelp(StringBuilder sb, CodegenConfig config) {
|
||||
if (Boolean.TRUE.equals(markdownHeader)) {
|
||||
sb.append("---").append(newline);
|
||||
sb.append("title: Config Options for ").append(generatorName).append(newline);
|
||||
sb.append("sidebar_label: ").append(generatorName).append(newline);
|
||||
sb.append("---").append(newline);
|
||||
} else {
|
||||
sb.append(newline);
|
||||
sb.append("## CONFIG OPTIONS");
|
||||
|
||||
if (Boolean.TRUE.equals(namedHeader)) {
|
||||
sb.append(" for <em>").append(generatorName).append("</em>").append(newline);
|
||||
}
|
||||
}
|
||||
|
||||
sb.append(newline);
|
||||
|
||||
sb.append("| Option | Description | Values | Default |").append(newline);
|
||||
sb.append("| ------ | ----------- | ------ | ------- |").append(newline);
|
||||
|
||||
Map<String, CliOption> langCliOptions = config.cliOptions()
|
||||
.stream()
|
||||
.collect(Collectors.toMap(CliOption::getOpt, Function.identity(), (a, b) -> {
|
||||
throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a.getOpt(), b.getOpt()));
|
||||
}, TreeMap::new));
|
||||
|
||||
langCliOptions.forEach((key, langCliOption) -> {
|
||||
// start
|
||||
sb.append("|");
|
||||
|
||||
// option
|
||||
sb.append(escapeHtml4(key)).append("|");
|
||||
// description
|
||||
sb.append(escapeHtml4(langCliOption.getDescription())).append("|");
|
||||
|
||||
// values
|
||||
Map<String, String> enums = langCliOption.getEnum();
|
||||
if (enums != null) {
|
||||
sb.append("<dl>");
|
||||
|
||||
for (Map.Entry<String, String> entry : enums.entrySet()) {
|
||||
sb.append("<dt>**").append(escapeHtml4(entry.getKey())).append("**</dt>");
|
||||
sb.append("<dd>").append(escapeHtml4(entry.getValue())).append("</dd>");
|
||||
}
|
||||
|
||||
sb.append("<dl>");
|
||||
} else {
|
||||
sb.append(" ");
|
||||
}
|
||||
sb.append("|");
|
||||
|
||||
// default
|
||||
sb.append(escapeHtml4(langCliOption.getDefault())).append("|");
|
||||
|
||||
sb.append(newline);
|
||||
});
|
||||
|
||||
|
||||
if (Boolean.TRUE.equals(importMappings)) {
|
||||
sb.append(newline);
|
||||
sb.append("## IMPORT MAPPING");
|
||||
sb.append(newline);
|
||||
sb.append(newline);
|
||||
|
||||
sb.append("| Type/Alias | Imports |").append(newline);
|
||||
sb.append("| ---------- | ------- |").append(newline);
|
||||
|
||||
config.importMapping()
|
||||
.entrySet()
|
||||
.stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.forEachOrdered(kvp -> {
|
||||
sb.append("|").append(escapeHtml4(kvp.getKey())).append("|").append(escapeHtml4(kvp.getValue())).append("|");
|
||||
sb.append(newline);
|
||||
});
|
||||
|
||||
sb.append(newline);
|
||||
}
|
||||
|
||||
if (Boolean.TRUE.equals(instantiationTypes)) {
|
||||
sb.append(newline);
|
||||
sb.append("## INSTANTIATION TYPES");
|
||||
sb.append(newline);
|
||||
sb.append(newline);
|
||||
|
||||
sb.append("| Type/Alias | Instantiated By |").append(newline);
|
||||
sb.append("| ---------- | --------------- |").append(newline);
|
||||
|
||||
config.instantiationTypes()
|
||||
.entrySet()
|
||||
.stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.forEachOrdered(kvp -> {
|
||||
sb.append("|").append(escapeHtml4(kvp.getKey())).append("|").append(escapeHtml4(kvp.getValue())).append("|");
|
||||
sb.append(newline);
|
||||
});
|
||||
|
||||
sb.append(newline);
|
||||
}
|
||||
|
||||
if (Boolean.TRUE.equals(languageSpecificPrimitives)) {
|
||||
sb.append(newline);
|
||||
sb.append("## LANGUAGE PRIMITIVES");
|
||||
sb.append(newline);
|
||||
sb.append(newline);
|
||||
sb.append("<ul data-columns=\"2\" style=\"list-style-type: disc;-webkit-columns:2;-moz-columns:2;columns:2;-moz-column-fill:auto;column-fill:auto\">");
|
||||
config.languageSpecificPrimitives()
|
||||
.stream()
|
||||
.sorted(String::compareTo)
|
||||
.forEach(s -> sb.append("<li>").append(escapeHtml4(s)).append("</li>").append(newline));
|
||||
sb.append("</ul>");
|
||||
sb.append(newline);
|
||||
}
|
||||
|
||||
if (Boolean.TRUE.equals(reservedWords)) {
|
||||
sb.append(newline);
|
||||
sb.append("## RESERVED WORDS");
|
||||
sb.append(newline);
|
||||
sb.append(newline);
|
||||
sb.append("<ul data-columns=\"2\" style=\"list-style-type: disc;-webkit-columns:2;-moz-columns:2;columns:2;-moz-column-fill:auto;column-fill:auto\">");
|
||||
config.reservedWords()
|
||||
.stream()
|
||||
.sorted(String::compareTo)
|
||||
.forEach(s -> sb.append("<li>").append(escapeHtml4(s)).append("</li>").append(newline));
|
||||
sb.append("</ul>");
|
||||
sb.append(newline);
|
||||
}
|
||||
}
|
||||
|
||||
private void generateYamlSample(StringBuilder sb, CodegenConfig config) {
|
||||
|
||||
for (CliOption langCliOption : config.cliOptions()) {
|
||||
@@ -147,58 +304,6 @@ public class ConfigHelp implements Runnable {
|
||||
}
|
||||
}
|
||||
|
||||
private void generateMarkdownHelp(StringBuilder sb, CodegenConfig config) {
|
||||
if (Boolean.TRUE.equals(markdownHeader)) {
|
||||
sb.append("---").append(newline);
|
||||
sb.append("title: Config Options for ").append(generatorName).append(newline);
|
||||
sb.append("sidebar_label: ").append(generatorName).append(newline);
|
||||
sb.append("---").append(newline);
|
||||
} else {
|
||||
sb.append(newline);
|
||||
sb.append("## CONFIG OPTIONS");
|
||||
|
||||
if (Boolean.TRUE.equals(namedHeader)) {
|
||||
sb.append(" for <em>").append(generatorName).append("</em>").append(newline);
|
||||
}
|
||||
}
|
||||
|
||||
sb.append(newline);
|
||||
|
||||
sb.append("| Option | Description | Values | Default |").append(newline);
|
||||
sb.append("| ------ | ----------- | ------ | ------- |").append(newline);
|
||||
|
||||
for (CliOption langCliOption : config.cliOptions()) {
|
||||
// start
|
||||
sb.append("|");
|
||||
|
||||
// option
|
||||
sb.append(escapeHtml4(langCliOption.getOpt())).append("|");
|
||||
// description
|
||||
sb.append(escapeHtml4(langCliOption.getDescription())).append("|");
|
||||
|
||||
// values
|
||||
Map<String, String> enums = langCliOption.getEnum();
|
||||
if (enums != null) {
|
||||
sb.append("<dl>");
|
||||
|
||||
for (Map.Entry<String, String> entry : enums.entrySet()) {
|
||||
sb.append("<dt>**").append(escapeHtml4(entry.getKey())).append("**</dt>");
|
||||
sb.append("<dd>").append(escapeHtml4(entry.getValue())).append("</dd>");
|
||||
}
|
||||
|
||||
sb.append("<dl>");
|
||||
} else {
|
||||
sb.append(" ");
|
||||
}
|
||||
sb.append("|");
|
||||
|
||||
// default
|
||||
sb.append(escapeHtml4(langCliOption.getDefault())).append("|");
|
||||
|
||||
sb.append(newline);
|
||||
}
|
||||
}
|
||||
|
||||
private void generatePlainTextHelp(StringBuilder sb, CodegenConfig config) {
|
||||
sb.append(newline);
|
||||
sb.append("CONFIG OPTIONS");
|
||||
@@ -206,15 +311,129 @@ public class ConfigHelp implements Runnable {
|
||||
sb.append(" for ").append(generatorName).append(newline);
|
||||
}
|
||||
|
||||
sb.append(newline);
|
||||
sb.append(newline);
|
||||
|
||||
for (CliOption langCliOption : config.cliOptions()) {
|
||||
sb.append("\t").append(langCliOption.getOpt());
|
||||
String optIndent = "\t";
|
||||
String optNestedIndent = "\t ";
|
||||
|
||||
Map<String, CliOption> langCliOptions = config.cliOptions()
|
||||
.stream()
|
||||
.collect(Collectors.toMap(CliOption::getOpt, Function.identity(), (a, b) -> {
|
||||
throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a.getOpt(), b.getOpt()));
|
||||
}, TreeMap::new));
|
||||
|
||||
langCliOptions.forEach((key, langCliOption) -> {
|
||||
sb.append(optIndent).append(key);
|
||||
sb.append(newline);
|
||||
sb.append("\t ").append(langCliOption.getOptionHelp()
|
||||
.replaceAll("\n", System.lineSeparator() + "\t "));
|
||||
sb.append(optNestedIndent).append(langCliOption.getOptionHelp()
|
||||
.replaceAll("\n", System.lineSeparator() + optNestedIndent));
|
||||
sb.append(newline);
|
||||
sb.append(newline);
|
||||
});
|
||||
|
||||
if (Boolean.TRUE.equals(importMappings)) {
|
||||
sb.append(newline);
|
||||
sb.append("IMPORT MAPPING");
|
||||
sb.append(newline);
|
||||
sb.append(newline);
|
||||
Map<String, String> map = config.importMapping()
|
||||
.entrySet()
|
||||
.stream()
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (a, b) -> {
|
||||
throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a, b));
|
||||
}, TreeMap::new));
|
||||
writePlainTextFromMap(sb, map, optIndent, optNestedIndent, "Type/Alias", "Imports");
|
||||
sb.append(newline);
|
||||
}
|
||||
|
||||
if (Boolean.TRUE.equals(instantiationTypes)) {
|
||||
sb.append(newline);
|
||||
sb.append("INSTANTIATION TYPES");
|
||||
sb.append(newline);
|
||||
sb.append(newline);
|
||||
Map<String, String> map = config.instantiationTypes()
|
||||
.entrySet()
|
||||
.stream()
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (a, b) -> {
|
||||
throw new IllegalStateException(String.format(Locale.ROOT, "Duplicated options! %s and %s", a, b));
|
||||
}, TreeMap::new));
|
||||
writePlainTextFromMap(sb, map, optIndent, optNestedIndent, "Type/Alias", "Instantiated By");
|
||||
sb.append(newline);
|
||||
}
|
||||
|
||||
if (Boolean.TRUE.equals(languageSpecificPrimitives)) {
|
||||
sb.append(newline);
|
||||
sb.append("LANGUAGE PRIMITIVES");
|
||||
sb.append(newline);
|
||||
sb.append(newline);
|
||||
String[] arr = config.languageSpecificPrimitives().stream().sorted().toArray(String[]::new);
|
||||
writePlainTextFromArray(sb, arr, optIndent);
|
||||
sb.append(newline);
|
||||
}
|
||||
|
||||
if (Boolean.TRUE.equals(reservedWords)) {
|
||||
sb.append(newline);
|
||||
sb.append("RESERVED WORDS");
|
||||
sb.append(newline);
|
||||
sb.append(newline);
|
||||
String[] arr = config.reservedWords().stream().sorted().toArray(String[]::new);
|
||||
writePlainTextFromArray(sb, arr, optIndent);
|
||||
sb.append(newline);
|
||||
}
|
||||
}
|
||||
|
||||
private void writePlainTextFromMap(
|
||||
StringBuilder sb,
|
||||
Map<String, String> map,
|
||||
String optIndent,
|
||||
String optNestedIndent,
|
||||
@SuppressWarnings("SameParameterValue") String keyHeader,
|
||||
String valueHeader) {
|
||||
if (map != null && map.size() > 0) {
|
||||
int maxKey = keyHeader.length();
|
||||
int maxValue = valueHeader.length();
|
||||
|
||||
for (Map.Entry<String, String> entry : map.entrySet()) {
|
||||
String k = entry.getKey();
|
||||
String v = entry.getValue();
|
||||
maxKey = Math.max(maxKey, k.length());
|
||||
maxValue = Math.max(maxValue, v.length());
|
||||
}
|
||||
|
||||
String format = "%-" + maxKey + "s\t%-" + maxValue + "s";
|
||||
sb.append(optIndent).append(String.format(Locale.ROOT, format, keyHeader, valueHeader));
|
||||
sb.append(newline);
|
||||
sb.append(optIndent).append(String.format(Locale.ROOT, format, StringUtils.repeat("-", maxKey), StringUtils.repeat("-", maxValue)));
|
||||
map.forEach((key, value) -> {
|
||||
sb.append(newline);
|
||||
sb.append(optIndent).append(String.format(Locale.ROOT, format, key, value));
|
||||
});
|
||||
} else {
|
||||
sb.append(optIndent).append("None");
|
||||
}
|
||||
}
|
||||
|
||||
private void writePlainTextFromArray(StringBuilder sb, String[] arr, String optIndent) {
|
||||
if (arr.length > 0) {
|
||||
// target a width of 20, then take the max up to 40.
|
||||
int width = 20;
|
||||
for (String s : arr) {
|
||||
width = Math.max(width, Math.min(40, s.length()));
|
||||
}
|
||||
|
||||
// do three columns if possible (assume terminal width ~90), otherwise do two columns.
|
||||
int columns = width < 30 ? 3 : 2;
|
||||
String format = "%-" + (90 / columns) + "s";
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
String current = arr[i];
|
||||
sb.append(optIndent).append(String.format(Locale.ROOT, format, current));
|
||||
if ((i + 1) % columns == 0) {
|
||||
sb.append(newline);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
sb.append(optIndent).append("None");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -25,6 +25,9 @@ public class ListGenerators implements Runnable {
|
||||
@Option(name = {"-d", "--docsite" }, description = "format for docusaurus site output", hidden = true)
|
||||
private Boolean docusaurus = false;
|
||||
|
||||
@Option(name = {"--github-nested-index" }, description = "format for github index at docs/generators/README.md", hidden = true)
|
||||
private Boolean githubNestedIndex = false;
|
||||
|
||||
@Option(name = {"-i", "--include" },
|
||||
description = "comma-separated list of stability indexes to include (value: all,beta,stable,experimental,deprecated). Excludes deprecated by default.",
|
||||
allowedValues = { "all", "beta", "stable", "experimental", "deprecated" })
|
||||
@@ -85,7 +88,7 @@ public class ListGenerators implements Runnable {
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if(!list.isEmpty()) {
|
||||
if (docusaurus) {
|
||||
if (docusaurus || githubNestedIndex) {
|
||||
sb.append("## ").append(typeName).append(" generators");
|
||||
} else {
|
||||
sb.append(typeName).append(" generators:");
|
||||
@@ -94,9 +97,10 @@ public class ListGenerators implements Runnable {
|
||||
|
||||
list.forEach(generator -> {
|
||||
GeneratorMetadata meta = generator.getGeneratorMetadata();
|
||||
if (docusaurus) {
|
||||
if (docusaurus || githubNestedIndex) {
|
||||
sb.append("* ");
|
||||
String id = "generators/" + generator.getName() + ".md";
|
||||
String idPrefix = docusaurus ? "generators/" : "";
|
||||
String id = idPrefix + generator.getName() + ".md";
|
||||
sb.append("[").append(generator.getName());
|
||||
|
||||
if (meta != null && meta.getStability() != null && meta.getStability() != Stability.STABLE) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -36,6 +36,7 @@ import org.slf4j.LoggerFactory;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -159,7 +160,7 @@ public class Meta implements Runnable {
|
||||
LOGGER.info("copying file to {}", outputFile.getAbsolutePath());
|
||||
}
|
||||
|
||||
FileUtils.writeStringToFile(outputFile, formatted);
|
||||
FileUtils.writeStringToFile(outputFile, formatted, StandardCharsets.UTF_8);
|
||||
return outputFile;
|
||||
|
||||
} catch (IOException e) {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
||||
Reference in New Issue
Block a user