1- import { dasherize } from 'json-api-validations/-private/utils/dasherize' ;
1+ /*
2+ import { dasherize } from '@ember/string';
23import validateResourceRelationships from './validate-relationships';
34import validateResourceAttributes from './validate-attributes';
4- import coalesceAndThrowErrors from './coalesce-errors' ;
55import { RESOURCE_ERROR_TYPES, ResourceError } from './errors/resource-error';
66
77const _EXPECTED_RESOURCE_KEYS = [
@@ -13,10 +13,22 @@ const _MANDATORY_PRIMARY_RESOURCE_KEYS = [
1313const _MANDATORY_SECONDARY_RESOURCE_KEYS = [
1414 'attributes', 'relationships'
1515];
16-
17- export default function validateResource ( resource , methodName , path ) {
18- let errors = [ ] ;
19-
16+ */
17+
18+ /**
19+ *
20+ * @param validator
21+ * @param document
22+ * @param issues
23+ * @param target
24+ * @param path
25+ */
26+ export default function validateResource ( /*{ validator, document, issues, target, path }*/ ) {
27+
28+ // TODO don't early return;
29+ return true ;
30+
31+ /*
2032 if (!resource) {
2133 errors.push(new ResourceError(RESOURCE_ERROR_TYPES.RESOURCE_MISSING, undefined, undefined, resource, path));
2234
@@ -31,9 +43,10 @@ export default function validateResource(resource, methodName, path) {
3143 errors = errors.concat(detectTypeErrors(resource, methodName, path));
3244 }
3345
34- coalesceAndThrowErrors ( errors ) ;
46+ */
3547}
3648
49+ /*
3750function detectStructuralErrors(payload, methodName, path) {
3851 let resourceKeys = Object.keys(payload);
3952 let errors = [];
@@ -104,3 +117,4 @@ function detectTypeErrors(resource, methodName, path) {
104117
105118 return errors;
106119}
120+ */
0 commit comments