You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.
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.
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.
types:
_MyType: # Have to create this as unfortunately, we cannot refer self in facetsadditionalProperties: falseproperties:
id: stringname: stringMyType:
type: _MyTypeadditionalProperties: false#facets:
wellknown-object-value?: _MyTypeMyInstance:
type: MyTypewellknown-object-value:
id: "345"name: "afds"
This method allows us to define instances in RAML fragments but it has below issues.
Semantic meaning of types is changed to define instances. Instances still are defined as RAML Types.
Instances can be inherited as they are still types. This doesn't make sense for instances.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: