spec icon indicating copy to clipboard operation
spec copied to clipboard

Discovery spec: avoid "all lower case without punctuation"?

Open jskeet opened this issue 2 years ago • 6 comments

The Discovery spec uses JSON with all-lower-case property keys (e.g. "subscriptiondialects" and "subscriptionurl") which are quite tricky to read.

I'd expect more idiomatic JSON keys to be "subscriptionDialects" and "subscriptionUrl" for example - or if we really wanted to stick to lower case ASCII, we could use "subscription_dialects" and "subscription_url".

The current JSON is consistent with CloudEvent attribute requirements, but I don't think it absolutely has to be - and I would suggest we might want to revisit those requirements for v2 anyway.

This would be a big change, of course - but better now than after 1.0...

jskeet avatar Oct 20 '21 07:10 jskeet

Since, like CE, we're not trying to manifest these fields in all sorts of interesting places (like http headers where case doesn't matter), this seems like a reasonable thing to do.

duglin avatar Nov 04 '21 13:11 duglin

All - we discussed this on today's call but there wasn't a significant preference on a direction. So, we're going to vote on this during next week's call. We decided to not limit it to people with voting rights, so please either state your preference in this issue (if you can't make the call) or be prepared to vote during the call.

duglin avatar Nov 04 '21 17:11 duglin

My 10 cents: camel:3 snake:3 all-lower-case:4 Arguments: it takes the least number of keystrokes & it avoids the war between camels and snakes

adgerrits avatar Nov 04 '21 20:11 adgerrits

camel (subscriptionDialects): cathy, clemens, jem, klaus, lance, manuel, scott, camel, tommy, doug snake (subscription_dialects): all-lower (subscriptiondialects): erik, ad

duglin avatar Nov 11 '21 17:11 duglin

@jskeet did you want to create a PR to update the discovery spec?

duglin avatar Nov 17 '21 23:11 duglin

@duglin: Happy to - it may not be in time for consideration at today's meeting though.

jskeet avatar Nov 18 '21 06:11 jskeet

I believe the latest Registry spec follows this issue's proposed direction so I think we can close this now. @jskeet let me know if I should reopen it

duglin avatar Feb 21 '23 19:02 duglin

Fine by me :)

jskeet avatar Feb 21 '23 19:02 jskeet