Here’s a fragment RAML document that defines a (not very interesting) type:
types: RestrictedScalar: type: string | integer
Should this fragment be considered equivalent, or is it invalid?
types: RestrictedScalar: string | integer
I don’t see any examples quite like this in the spec, but the spec does state “Type expressions can be used wherever a type is expected.” (first paragraph at https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md/#type-expressions)