Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[Request] New type - map #650
It seems it's impossible to define maps in RAML other than via
It would be nice if we had another type called
Actually, we need something more generic. The keys are not necessarily limited to a set of values. Probably your intention is to support any scalar or user-defined type for keys: and values:
sichvoge - what are patterProperties?
Here is another Map in JSON that I cannot figure out how to define in RAML. We can define a pattern for the strings but there is no other limit on actual values. This is how Jackson renders a Map<String, String> property named "translations" in a Java class.
Actually it's possible! But the explanation is a bit in the dark: https://github.com/raml-org/raml-spec/blob/master/versions/raml-10/raml-10.md#additional-properties
The definition of the above example would be:
types: MyMappingType: properties: //: type: integer