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

Add recursive merging in APISpec.to_dict #218

Closed
b0g3r opened this issue May 27, 2018 · 3 comments
Closed

Add recursive merging in APISpec.to_dict #218

b0g3r opened this issue May 27, 2018 · 3 comments

Comments

@b0g3r
Copy link

b0g3r commented May 27, 2018

In Open API spec 3.0.1 securityDefinitions was renaming and moved to components

APISpec class allowed add additional fields to swagger file with kwarg-parameter options. I try add components with security definition to kwarg, but this rewrite schema definitions (in swagger 3.0.1 schema definitions also in components)

Currently in APISpec.to_dict used dict.update method, but this works without recursion and rewrite nested dict.

How about replace this method to recursive merging (e.g. https://gist.github.com/angstwad/bf22d1822c38a92ec0a9)?

@b0g3r
Copy link
Author

b0g3r commented May 27, 2018

May be linked with #165

@fMeow
Copy link
Contributor

fMeow commented Jun 6, 2018

I have propose a PR #222 on this issue.

However, I don't think it necessary to recursively update components object. Instead, this issue just happens because apispec would generate a components object with schemas and parameters.

And a simpler way is to merge schemas and parameters, while copying all other fields like 'securitySchemes`.

@sloria
Copy link
Member

sloria commented Jun 10, 2018

This is addressed by #222.

@sloria sloria closed this as completed Jun 10, 2018
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

3 participants