-
-
Notifications
You must be signed in to change notification settings - Fork 848
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
hal collection links should have a href property #1775
hal collection links should have a href property #1775
Conversation
Good catch. We should also validate the produced HAL output using http://hyperschema.org/mediatypes/hal. As we do for Swagger and JSONAPI. |
@dunglas happy to take a look. can you point me towards what is done currently for swagger and jsonapi? |
|
@dunglas i think I've done what you wanted. Additionally, schema validation was completely broken (not validating at all) in the jsonapi features/context, so I've fixed that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome
This makes me think that it might be nice to have a script to update our JSON Schema files from: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
features/hal/collection.feature
Outdated
"item": [ | ||
{ | ||
"href": "/dummies/2" | ||
And the JSON should be valid according to the JSON HAL schema |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doh
Thank you very much @bendavies! |
It seems to me that json hal links for collections where missing the href property:
https://tools.ietf.org/html/draft-kelly-json-hal-08#section-5.1