Open xogeny opened 6 years ago
Once approach could be to import external specifications with some defined scoping, e.g.,
{
// Normal specification
"import": {
"sub1": "http://host/where/sub/spec/can/be/found.json"
}
}
...and then import all the entities from that profile with the sub1
prefix to avoid namespace collisions. For example, a collection
resource defined there would become sub1:collection
.
While composability would be nice, I don't want this to turn into a case of the perfect being the enemy of the good enough. I primarily want to document and design an API, not design a whole framework for integrating APIs with namespaces, integration semantics, etc..
As mentioned in #1, a specification might potentially be a sub-specification of one section of the API or of some isolated and reusable set of functionality. In order to promote reuse of such sub-specifications, I need to think about how one might import such sub-specifications.