Closed vivin closed 8 years ago
bump
I've summarized my concerns in a StackOverflow question. Although the question talks about Spring HATEOAS, a lot of the confusion is because it's not clear what the correct wild-card type is for HAL+JSON.
Is there a plan to make +hal+json
a registered suffix?
Very interested to know what content type should be used
I wouldn't worry about this too much, the identifier is basically an opaque string from a machine processing point of view so as long as it conveys clearly that it is based on "hal+json" then I think you're good.
Maybe someone who understands the minutiae of IANA media type identifier rules can tell you which is right. If they don't turn up just go with whatever you like :)
I have seen custom media-types that support HAL described as follows:
application/vnd.application.entity.v1.hal+json
application/vnd.application.entity.v1.json+hal
application/vnd.application.entity.v1+hal+json
It seems like the second and third formats are illegal per section 4.2.8 of RFC6838 since it says that only registered suffixes should be used.
Another question I have is regarding the format for wildcard HAL. Which one of the following is correct?
application/*.hal+json
application/*hal+json
Based on the previously-mentioned RFC, I am assuming that
application/*+hal+json
is illegal as well.