Skip to content

add validation for model name and id #28

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

Merged
merged 1 commit into from
Jun 3, 2015
Merged

add validation for model name and id #28

merged 1 commit into from
Jun 3, 2015

Conversation

kentwills
Copy link
Contributor

See issue #27. @dnephin @prat0318

@coveralls
Copy link

Coverage Status

Coverage increased (+0.65%) to 84.65% when pulling 07bc3a6 on kentwills:validate_model into 5628cf5 on Yelp:master.

@@ -159,6 +159,9 @@ def validate_model(model, model_name, model_ids):
'Model "%s": required property "%s" not found' %
(model_name, required))

if model_name != model['id']:
raise SwaggerValidationError('model name: {0} does not match model id: {1}'.format(model_name, model['id']))
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit pick: break in two lines. < 80

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@prat0318
Copy link
Contributor

prat0318 commented Jun 3, 2015

Ship it.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.73%) to 84.73% when pulling 951c74c on kentwills:validate_model into 5628cf5 on Yelp:master.

prat0318 added a commit that referenced this pull request Jun 3, 2015
add validation for model name and id
@prat0318 prat0318 merged commit b206e83 into Yelp:master Jun 3, 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.

3 participants