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

errorsArrayToHash and errorsHashToArray functions looking for data/attributes/ instead of /data/attributes (missing trailing slash?) #3557

Closed
jcope2013 opened this issue Jul 17, 2015 · 3 comments

Comments

@jcope2013
Copy link
Contributor

"pointer: a JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/data" for a primary data object, or "/data/attributes/title" for a specific attribute]."

http://jsonapi.org/format/#errors-processing

https://github.com/emberjs/data/blob/master/packages/ember-data/lib/adapters/errors.js#L125
https://github.com/emberjs/data/blob/master/packages/ember-data/lib/adapters/errors.js#L145

@tchak
Copy link
Member

tchak commented Jul 18, 2015

I am sorry I don't understand the problem here. Can you explain a bit more?

@jcope2013
Copy link
Contributor Author

@tchak it is just a slight change / is missing before data according to the spec

errorsHashToArray currently sets pointer to this

source:  {
          pointer: `data/attributes/${key}`
         }

but according to the spec (http://jsonapi.org/format/#errors-processing) it should instead look like this

source:  {
          pointer: `/data/attributes/${key}`
         }

https://github.com/emberjs/data/blob/master/packages/ember-data/lib/adapters/errors.js#L125

@tchak
Copy link
Member

tchak commented Jul 18, 2015

Oh right. I agree. Will fix it.

tchak added a commit to tchak/data that referenced this issue Jul 18, 2015
"pointer: a JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/data" for a primary data object, or "/data/attributes/title" for a specific attribute]."

Closes emberjs#3557
bmac pushed a commit to bmac/data that referenced this issue Jul 21, 2015
"pointer: a JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/data" for a primary data object, or "/data/attributes/title" for a specific attribute]."

Closes emberjs#3557

(cherry picked from commit 33c6744)

Conflicts:
	packages/ember-data/lib/adapters/errors.js
bmac pushed a commit that referenced this issue Jul 22, 2015
"pointer: a JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/data" for a primary data object, or "/data/attributes/title" for a specific attribute]."

Closes #3557

(cherry picked from commit 33c6744)

Conflicts:
	packages/ember-data/lib/adapters/errors.js
jcope2013 pushed a commit to jcope2013/data that referenced this issue Aug 3, 2015
"pointer: a JSON Pointer [RFC6901] to the associated entity in the request document [e.g. "/data" for a primary data object, or "/data/attributes/title" for a specific attribute]."

Closes emberjs#3557
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

2 participants