You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
When using the maven plugin, I can specify an Open API Spec file using the <inputSpec>./filename.yaml</inputSpec> tag, or I can specify an <inputSpecRootDirectory>./directory-of-specs/</inputSpecRootDirectory> for it to merge the files before generating the code. When I choose the latter option, I get an error saying inputSpec is required, despite the generator ignoring the input when the inputSpecRootDirectory is specified:
if (StringUtils.isNotBlank(inputSpecRootDirectory)) {
inputSpec = newMergedSpecBuilder(inputSpecRootDirectory, mergedFileName)
.buildMergedSpec();
LOGGER.info("Merge input spec would be used - {}", inputSpec);
}
FileinputSpecFile = newFile(inputSpec);
As such, the inputSpec parameter should be optional, and validation should check that one of inputSpec or inputSpecRootDirectory is specified (perhaps with a warning if both are given)
Bug Report Checklist
Description
When using the maven plugin, I can specify an Open API Spec file using the
<inputSpec>./filename.yaml</inputSpec>
tag, or I can specify an<inputSpecRootDirectory>./directory-of-specs/</inputSpecRootDirectory>
for it to merge the files before generating the code. When I choose the latter option, I get an error saying inputSpec is required, despite the generator ignoring the input when the inputSpecRootDirectory is specified:As such, the
inputSpec
parameter should be optional, and validation should check that one of inputSpec or inputSpecRootDirectory is specified (perhaps with a warning if both are given)openapi-generator version
Latest (7.0.1)
Maven pom.xml
https://github.com/fullstack-jack/openapi-generator-maven-plugin-example
Steps to reproduce
mvn generate-sources
to see required field error<inputSpec>xxx</inputSpec>
mvn generate-sources
to see it create sources correctly despite useless inputSpecRelated issues/PRs
none
Suggest a fix
I might get round to creating a PR some time this week but support from anyone else is very welcome.
The text was updated successfully, but these errors were encountered: