Skip to content

Proposal to allow generation of multiple GroupedOpenApi #40

Closed
@jrmcdonald

Description

@jrmcdonald

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions