mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2026-03-25 16:29:05 +00:00
[openapi-yaml] Config option outputFile was ignored by the generator. (#3199)
This commit is contained in:
committed by
Jérémie Bresson
parent
06cfdbbdc6
commit
4ac33d80f0
@@ -28,7 +28,7 @@ public class OpenAPIYamlGenerator extends DefaultCodegen implements CodegenConfi
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(OpenAPIYamlGenerator.class);
|
||||
|
||||
protected String outputFile = "openapi.yaml";
|
||||
protected String outputFile = "openapi/openapi.yaml";
|
||||
|
||||
public OpenAPIYamlGenerator() {
|
||||
super();
|
||||
@@ -36,9 +36,6 @@ public class OpenAPIYamlGenerator extends DefaultCodegen implements CodegenConfi
|
||||
outputFolder = "generated-code/openapi-yaml";
|
||||
cliOptions.add(new CliOption(OUTPUT_NAME, "output filename"));
|
||||
supportingFiles.add(new SupportingFile("README.md", "", "README.md"));
|
||||
supportingFiles.add(new SupportingFile("openapi.mustache",
|
||||
"openapi",
|
||||
"openapi.yaml"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -56,13 +53,14 @@ public class OpenAPIYamlGenerator extends DefaultCodegen implements CodegenConfi
|
||||
return "Creates a static openapi.yaml file (OpenAPI spec v3).";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void processOpts() {
|
||||
super.processOpts();
|
||||
if (additionalProperties.containsKey(OUTPUT_NAME)) {
|
||||
this.outputFile = additionalProperties.get(OUTPUT_NAME).toString();
|
||||
outputFile = additionalProperties.get(OUTPUT_NAME).toString();
|
||||
}
|
||||
LOGGER.info("Output file [outputFile={}]", outputFile);
|
||||
supportingFiles.add(new SupportingFile("openapi.mustache", outputFile));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -71,7 +69,6 @@ public class OpenAPIYamlGenerator extends DefaultCodegen implements CodegenConfi
|
||||
return super.postProcessSupportingFileData(objs);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String escapeQuotationMark(String input) {
|
||||
// just return the original string
|
||||
|
||||
Reference in New Issue
Block a user