dret / I-D

Internet Drafts I've authored or contributed to.
17 stars 13 forks source link

how to manage API label types #99

Open dret opened 6 years ago

dret commented 6 years ago

there are different ways in which a label format can use label types. they could be hardcoded, which is probably much too limiting. they might use completely opaque identifiers, which could make it hard to get consensus around some popular ones. another way could be to go the way of link relation types and use a registry. registered label types then can use simple strings, and extension link type can use URIs. this separates the two namespaces, and allows extension label types to be easily self-documenting (if the owner chooses to make the URI dereferencable).

mamund commented 6 years ago

LinkRel pattern seems like the right one to me.

dret commented 6 years ago

On Jun 24, 2018, at 09:24, Mike Amundsen notifications@github.com wrote: LinkRel pattern seems like the right one to me. registry to hold agreed labels extension pattern for label that are not registered (likely URI/URL)

thanks for the feedback! an added advantage may be that at least some API people know the pattern already. and personally, i also like how this elegantly splits the namespace using a simple naming convention.