Skip to content

Proposal to allow generation of multiple GroupedOpenApi #40

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

Closed
jrmcdonald opened this issue Feb 19, 2021 · 1 comment
Closed

Proposal to allow generation of multiple GroupedOpenApi #40

jrmcdonald opened this issue Feb 19, 2021 · 1 comment

Comments

@jrmcdonald
Copy link
Contributor

Background

I've recently discovered the need to generate two sets of API documentation with slight differences between them. This is easily achieved in springdoc by using GroupedOpenApis and OpenApiCustomisers. The different api-docs can be accessed, for example, at http://localhost:8080/v3/api-docs/groupA and http://localhost:8080/v3/api-docs/groupB respectively.

The stumbling block that I encountered was that I couldn't figure out how to get the plugin to download both files to separate locations.

Proposal

Add a new property to the extension which is a mapping of grouped api urls to output file names. Then in the task, if this property is set, we could iterate over the entries in the mapping and download each one in sequence.

I would imagine that there would need to be a precedence to the properties so for example if both were set, then only the multiple url mapping would take effect?

I'm happy to look into raising a PR for this if you think it would be valuable?

@bnasslahsen
Copy link
Contributor

Hi @jrmcdonald,

Your PR is welcome. And it would be great to add this interesting feature, for the next release.

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

No branches or pull requests

2 participants