Closed krispenner closed 2 years ago
Just my 2 cents: 1 - I think using a URL reference is fine. One of the reasons it's a SHOULD instead of a MUST is because there may be good reasons for not following our guidance. And if you want to start a viral movement to promote the use of URIs, go for it :-) 2 - I'm not sure that our examples should promote something that goes against our recommendation. Feels a little inconsistent to me.
Another 2 cents: there are several ways to uniquely characterize events but as reverse-DNS names are a common and simple way of eliminating namespace collisions I would stay with the advice to use it so it can become the default ('should') way. In line with the 'less is more' philosophy of CloudEvents, I think that links to meta information are better included through extension attributes.
Thank you both for your comments. I actually wish the Problem Details spec I referenced would allow for reverse-DNS style format of their type
attribute. I would prefer to use that format for both and then as @adgerrits suggested, add a custom attribute like docref
or something for a document reference URI.
While the Problem Detail RFC does not use the word MUST
when dictating a URI reference for type
, it also doesn't suggest I can use anything else there instead. So I may post on their spec about that. I'd just like the two to be a bit consistent, but obviously they are two very different standards. I was also thinking I could just return a Cloud Event for an error from our REST API wrapped in the HTTP binding instead of a Problem Detail... Anyways, will close this now.
Thanks again for your thoughts.
The spec currently encourages but doesn't force the use of a reverse-DNS name for the event type and the examples only use dot notation.
I'm curious if there has been any discussions for using a URI reference for the event type similar to the type attribute in Problem Details of rfc7807?
For our solution I would like that these be consistent and allow the user to dereference the URI for either which would provide a web page with a description of the event type or error type.
Cloud Events Type: https://docs.example.com/reference/events#customer_created
Problem Details Type: https://docs.example.com/reference/errors#customer_not_found
So a couple questions I have are:
type
which doesn't follow the SHOULD be prefixed with a reverse-DNS name. constraint be frowned upon or have any possible issues later with interoperability?Thank you for your time.