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

Sub Resource Validations Should Not Inherit Parent Resource Validators #12

Open
joshua-mcginnis opened this issue Jan 28, 2014 · 1 comment

Comments

@joshua-mcginnis
Copy link

Whenever POST /resource has a payload validator, the POST method on a sub-resource appears to inherit that validator. Note that I haven't tried other methods or other use-cases (sub_sub_resources, etc).

POST /resource/123/sub_resource should not be griping about a validator on POST /resource, but it does.

However this is fixed, we'll still want to be able to validate the id on a subResource.

Example:
/resource/:id/sub_resource, we should be able to add a validator for :id to the sub_resource to ensure it is present, int, and all that jazz.

caagency/caa-api2#419

@joshua-mcginnis
Copy link
Author

It looks like this also affects the auth: { scope: ... } config option.

A scope on /resource is being applied to /resource/:id/sub_resource.

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