-
Notifications
You must be signed in to change notification settings - Fork 118
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
Naming convention of additional properties in the descriptor #663
Naming convention of additional properties in the descriptor #663
Comments
@cpina i've moved this issue from the forum to here in specs.
Options:
|
Read the excellent RFC https://tools.ietf.org/html/rfc6648 "Deprecating the 'X-' Prefix and Similar Constructs in Application Protocols". Why using a prefix is a bad idea
How you should do it (protocol creators i.e. us Frictionless Data)Designers of new application protocols that allow extensions using
How you should d o it: creators of parameters (e.g. @cpina )Creators of new parameters to be used in the context of application
RFC https://tools.ietf.org/html/rfc4288 - Media Type Specifications and Registration ProceduresThis is their recommended approach. Essentially create namespaces and allow people easily to register into those names
3 registration trees:
|
So ...
OK, so here's the recommendation following the media types approach
|
Thanks very much for finding all the RFC and summarising/copying pasting relevant parts! For now I want to comment only one quick thing:
As a user of Frictionless Data this would work for me. As a Frictionless Data project: do you have anything in mind to the registering? A PR to a file might be enough to avoid potential duplicates and have a sanity naming check. I also thought of something hands-off for Frictionless Data: piggyback some existing system: domains is one and very ubiquitous, another one could be something along the lines of https://www.grid.ac/ where people can register an organisation, or ORCID (only for researchers), etc. but I haven't found something that is not only organisations and tight to some existing organisation (besides domains) (ORCID ids would be a headache to see in the JSON file!) |
I think that I'm splitting hairs myself here about. As a user any of the options would work for me, but do you think that all of this would be valid?: (I mean using variables vnd_spi_something or vnp_spi and then an object):
If it counts my thought is to prohibit
I guess that don't use unless agreed. We want to pass data to at least a partner organisation and they would read it :-) |
I don't link "vendor" either. SPI is not a vendor 😄 . We can create any name for the non-standard namespace we want. We could even use Any thoughts here /cc @pwalsh @roll @lauragift21
Yes, you can have a string or object.
I would like to piggyback and an obvious thing would be domain names as java do with their namespacing. However this seems a bit cumbersome and I can't think of something super authoritative. i think the easiest is simply to allow people to register an id in an easy way e.g. via a PR to a repo and to have a recommendation e.g. reuse your github / org handle if you have one. |
Data Package Pipelines uses prefixes like |
FIXED by #50 |
In the table-schema.md spec it says:
https://github.com/frictionlessdata/specs/blob/master/specs/table-schema.md#descriptor
If a user of the specification wanted to add a property to be used in their organisation: which naming convention should the user use?
E.g. we would like to add a "cfVariable": "http://cfconventions.org/Data/cf-standard-names/71/build/cf-standard-name-table.html#air_temperature". Naming it just cfVariable has some problems:
people finding a cfVariable property in a table schema might assume that it is a Frictionless Data standard and either use it or expect everyone to use it, expect the Frictionless Data tools to support it, etc.
if in the future Frictionless Data wanted to introduce cfVariable with different semantics or a different format it could cause incompatibility problems (e.g. we might just use a string to identify the version and the variable but it could also be a dictionary to identify the version and the variable).
currently the validation of schema files can be less strict as unknown properties now are ok (it could be one of the "other properties not defined in the specification") but perhaps it is a typo of an optional property
Prefixing the "additional properties" as "x-" (used by HTTP protocol but it seems that it has been deprecated1 in the HTTP case, or just "_" would help and is simple enough to identify non-official properties.
I've also thought of adding a prefix that would identify the organisation who introduced the property. E.g. if in the Swiss Polar Institute we wanted to use cfVariable it could be "spi_cfVariable". Two organisations could add the same property name using two "bas_cfVariable" if it had a different format/meaning.
Related and closed in favour of this
The text was updated successfully, but these errors were encountered: