Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQ] Allow MergedSpecBuilder title, version and description to be configured #20822

Open
saulgillEST opened this issue Mar 7, 2025 · 0 comments

Comments

@saulgillEST
Copy link

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

@saulgillEST saulgillEST changed the title [REQ] Feature Request Description [REQ] Allow MergedSpecBuilder title, version and description to be configured Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant