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

Allow setting the title, version and servers through configuration #107

Closed
royteeuwen opened this issue Dec 26, 2023 · 7 comments
Closed
Labels
enhancement New feature or request

Comments

@royteeuwen
Copy link

I'm trying to expand the generation of API specs to multiple files, but this does not work correctly. When generating one API spec, you can use the to specify the server urls. But if you would go to multiple API files based on the tag, where you typically want another title + version per file, you would have to redefine the server urls as well every time, because it overrides the entire freeFields of the generic configuration.

To mitigate this, I think it would be nice to have the title, version and servers as minimum to be able to configure as separate configuration fields, instead of using the freeFields

royteeuwen pushed a commit to royteeuwen/openapi-maven-plugin that referenced this issue Dec 26, 2023
@royteeuwen
Copy link
Author

@kbuntrock I have created an initial PR, could you review and see if you agree :)?

@kbuntrock
Copy link
Owner

Hello @royteeuwen.

I'm scared that this solution will not "scale" well. In the future, someone can come with the same request for another field.

What do you think about a configuration to merge the json in the freeField section instead of a global replacement?

@royteeuwen
Copy link
Author

I think the title, version and servers is a real global use case, but merging is the second best alternative for me 😄 better than the current situation

@kbuntrock
Copy link
Owner

I have pushed some code allowing a merge between the common and specific api configuration.
Could you try if it fits your needs?

An example of the configuration can be found in an integration test :

@royteeuwen
Copy link
Author

Looks good to me! can you create a release?

@kbuntrock
Copy link
Owner

Perfect :)

I will release when all on-going bugs and enhancement PRs are merged. In term of planning, it should be mid-february.

@kbuntrock
Copy link
Owner

Done, will be shipped on 0.0.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants