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

Fixes #24, #25 - validation of optional parameters containing required attributes #26

Merged
merged 4 commits into from
Apr 23, 2015

Conversation

mbacovsky
Copy link
Contributor

This PR should fix #24 and #25.

As a bonus I've added extra commit allowing to disable validation per call.

@mbacovsky
Copy link
Contributor Author

It would be great if @komidore64, @tstrachota or @thomasmckay could review/test this PR.

@komidore64
Copy link
Contributor

cool deal!

ack 🍺

@mbacovsky
Copy link
Contributor Author

BATS are green with this patch - http://ci.theforeman.org/job/systest_foreman_hammer_nightly/111/

@mbacovsky
Copy link
Contributor Author

Even the not fake BATs are green, @tstrachota: http://ci.theforeman.org/job/systest_foreman_hammer_nightly/112/

tree
end
def validate!(parameters)
errors = validate(params, parameters)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about using values instead of parameters. the params vs parameters might be a bit misleading

@iNecas
Copy link
Member

iNecas commented Apr 21, 2015

Nice job overall. Some comments inline

@iNecas
Copy link
Member

iNecas commented Apr 21, 2015

ACK

@mbacovsky
Copy link
Contributor Author

@mbacovsky
Copy link
Contributor Author

@iNecas could you please take a look at my new validation attempt (in separate commit that will eventualy get squashed)?

@iNecas
Copy link
Member

iNecas commented Apr 23, 2015

Small suggestions, leaving up to you if incorporating them or not. ACK

@mbacovsky
Copy link
Contributor Author

Thanks @iNecas! I'll rerun BATs and merge if green.

@mbacovsky
Copy link
Contributor Author

mbacovsky added a commit that referenced this pull request Apr 23, 2015
Fixes #24, #25 - validation of optional parameters containing required attributes
@mbacovsky mbacovsky merged commit 152d812 into Apipie:master Apr 23, 2015
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

Successfully merging this pull request may close these issues.

Non-required hash paramt turns required if contains required parameter
3 participants