Skip to content

Merge OpenAPI paths based on specific tags #100

@osimhi213

Description

@osimhi213

Hello,

I'm currently exploring the capabilities of OpenAPI and I'm curious if there's a way to merge multiple service Swagger files while selecting only the paths that have a specific tag. I've reviewed the documentation but couldn't find any details on this particular functionality.

For instance, let's consider the following scenario:
I have a merge.json file with inputs from multiple services:
{
"inputs": [
{
"inputFile": "service1/dist/functions/api/swagger.json"
},
{
"inputFile": "service2/dist/functions/api/swagger.json"
},
{
"inputFile": "service3/dist/functions/api/swagger.json"
}
],
"output": "./dist/service.output.swagger.json"
}

In this scenario, I'd like to include only the paths from service1 Swagger that comply with the "Service1" tag. Paths from service1 that don't comply with this tag should be excluded from this merged Swagger. Using the Hidden() decorator isn't suitable for my needs, as I would like to include the other tags in different merged swaggers.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions