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

Merge securitySchemes of input files #33

Open
andreasanta opened this issue Dec 18, 2021 · 2 comments
Open

Merge securitySchemes of input files #33

andreasanta opened this issue Dec 18, 2021 · 2 comments

Comments

@andreasanta
Copy link

At the moment only the securitySchemes item from the first file parsed is taken.

This behavior is not documented and also not expected. And leads to validation errors on the final schema, in case the security key in one of the files references a schema that was not merged.

The logical implementation would be to perform a merge of all securitySchemes found across all the input files. At least a warning should be raised to inform the user and prevent blind attempts.

Thanks.

@dbryar
Copy link

dbryar commented Jul 22, 2022

I've done this now in a fork
https://github.com/dbryar/openapi-merge

@dbryar
Copy link

dbryar commented Jul 22, 2022

I also added a deepMerge flag to disputes as API gateway will have a single IDP provider, yet microservices may require different scopes, thus they need merging, and not to be given a suffix

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