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
MergedSpecBuilder title, version and description hard-coded
I am using the openapi-generator-maven-plugin in my Java project. Specifically, I am using an execution to "merge" several OAS files into one at build-time. It works fine but...
In the MergedSpecBuilder class, I see hard coded values for title, version and description in the info section of the merged api file. This means there is no option to add a custom value for these fields. Link here
It would be great to have some mechanism to add custom values there in the header. Often, in OAS files, the name and description are important for those consuming the API. And versioning is essential.
I'd like for there to be usable configOptions in the maven plugin for this purpose - like in other parts of the openapi generator - like appName, appDescription, appVersion or similar.
Describe alternatives you've considered
I am aware that I can use other maven plugins to execute scripts and perform post-processing on the merged file. This would not be the cleanest solution in my opinion. It would certainly lead to issues for those building the project - for example - a bash script would be fine on Linux but may have issues on other environments.
I have also taken a look through other configuration options for open api during generation of html or json to see if the changes can be made there. However, in my case, the merged file needs to have the correct header field values
I don't think I am the only one who would benefit from this feature.
Thanks
The text was updated successfully, but these errors were encountered:
saulgillEST
changed the title
[REQ] Feature Request Description
[REQ] Allow MergedSpecBuilder title, version and description to be configured
Mar 7, 2025
MergedSpecBuilder title, version and description hard-coded
I am using the openapi-generator-maven-plugin in my Java project. Specifically, I am using an execution to "merge" several OAS files into one at build-time. It works fine but...
In the MergedSpecBuilder class, I see hard coded values for title, version and description in the info section of the merged api file. This means there is no option to add a custom value for these fields. Link here
Code shown here:
map.put("info", ImmutableMap.of( "title", "merged spec", "description", "merged spec", "version", "1.0.0" ));
Describe the solution you'd like
It would be great to have some mechanism to add custom values there in the header. Often, in OAS files, the name and description are important for those consuming the API. And versioning is essential.
I'd like for there to be usable configOptions in the maven plugin for this purpose - like in other parts of the openapi generator - like appName, appDescription, appVersion or similar.
Describe alternatives you've considered
I am aware that I can use other maven plugins to execute scripts and perform post-processing on the merged file. This would not be the cleanest solution in my opinion. It would certainly lead to issues for those building the project - for example - a bash script would be fine on Linux but may have issues on other environments.
I have also taken a look through other configuration options for open api during generation of html or json to see if the changes can be made there. However, in my case, the merged file needs to have the correct header field values
I don't think I am the only one who would benefit from this feature.
Thanks
The text was updated successfully, but these errors were encountered: