Skip to content
New issue

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

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

Already on GitHub? # to your account

Merge OpenAPI paths based on specific tags #100

Open
osimhi213 opened this issue May 26, 2024 · 0 comments
Open

Merge OpenAPI paths based on specific tags #100

osimhi213 opened this issue May 26, 2024 · 0 comments

Comments

@osimhi213
Copy link

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!

@osimhi213 osimhi213 changed the title Merge OpenAPI Paths Based on Specific Tags Merge OpenAPI paths based on specific tags May 26, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant