openmicroservices.org
openmicroservices.org copied to clipboard
Should specification include a "metadata" field?
TLDR; I propose adding a free-form, top-level
metafield to the specification.
In a world w/ more than one hub, each hub may have unique requirements for submitting microservices. For example, the Storyscript Hub may one day allow developers to submit custom images to represent their service.
Presently, the Storyscript Hub allows developers to submit services with special "meta" data such as; tags, category (w/ our own custom taxonomy), docker tag, service name, and description. Other hubs may want to be able to reuse these fields, and/or have additional fields as well.
Or maybe instead of re-using these fields, some of these hypothetical hubs may have unique requirements for categories (their own taxonomy), or maybe prefer an image with different dimensions, aspect ratio, file format, byte size limit, etc.
This proposed meta field could have all kinds of use-cases, far beyond just "other hubs". I doubt we're even capable of thinking of all the possible permutations people will come up with.
meta:
storyscript:
hub_image_url: https://domain.tld/200x200.png
hub_cover_image_url: https://domain.tld/400x1000.png
category: Text Processing
some_other_hub:
image_url: https://domain.tld/600x600.jpg
other_image_url: https://domain.tld/50x50.jpg
source_code: https://github.com/user/repo
support_email: [email protected]
yet_another_hub:
background_color: #453223
emoji: ⌛
verb: capture
noun: webpage
object: screenshot
More TKTKTK, just wanted to share some initial thoughts.
Presently, the Storyscript Hub allows developers to submit services with special "meta" data such as; tags, category (w/ our own custom taxonomy), docker tag, service name, and description. Other hubs may want to be able to reuse these fields, and/or have additional fields as well.
I think this a bit challenging, because how do you know that category won't be used by other hubs and thus should be better put in meta.category.
Anyhow, I still like the idea of introducing an "untyped" meta field that people can use for their hubs.
This proposed meta field could have all kinds of use-cases, far beyond just "other hubs". I doubt we're even capable of thinking of all the possible permutations people will come up with.
BTW one common solution is to disallow unknown fields except for x-*. This should cover all potential extension and use cases people might have:
https://github.com/microservices/openmicroservices.org/issues/170