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

model primitive enforce to include required fields in requests #170

Open
ybekdemir opened this issue Jan 15, 2019 · 0 comments
Open

model primitive enforce to include required fields in requests #170

ybekdemir opened this issue Jan 15, 2019 · 0 comments

Comments

@ybekdemir
Copy link

ybekdemir commented Jan 15, 2019

We are using pyswagger to make internal service call through gateway. Gateway validates request body with the related model by using model primitive. The problem is apply_with method in the model primitive enforce us to include all required fields in our requests body. Especially for the update calls we don't want to include required fields which we don't want to update. I found this code under aply_with

not_found = set(obj.required) - set(six.iterkeys(self))

I just want to learn that what is the reason behind this ? Is this best practice?

Thanks.

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

1 participant