We have a use case where users should be able to define well-known objects (instances) that are validated against their type in RAML. We need these instances defined as a RAML fragment.
We have found 2 ways to define instances with the current RAML specification. My intention with this bug ticket is to have a discussion on this topic, help us choose better approaches, or maybe if you see a need to enhance language with specific keywords to define instances.
We have a use case where users should be able to define well-known objects (instances) that are validated against their type in RAML. We need these instances defined as a RAML fragment.
We have found 2 ways to define instances with the current RAML specification. My intention with this bug ticket is to have a discussion on this topic, help us choose better approaches, or maybe if you see a need to enhance language with specific keywords to define instances.
Approach 1 using
annotationTypes
e.g.The problem is: that instances defined this way are in place with types and this is a restriction for us.
Approach 2 using facets e.g.
This method allows us to define instances in RAML fragments but it has below issues.