Should the ? symbol be considered part of the property name?


IMHO this is a parser bug in app-workbench 0.8.28. I accidentally left a ? at the end of myProp and now the parser wants the example to say “myProp?”:“somevalue” instead of “myProp”:“somevalue”, otherwise it says “unknown property:myProp”.

#%RAML 1.0
mediaType: application/json
title: Test RAML
    type: object
        type: string 
        required: false
        "myProp?": "somevalue" 


Why would you put a ‘?’ in the property name? Are you trying to specify that it’s a query property? I don’t think it’s necessary. There’s a RAML directive called “queryParameters” for that. For query parameters, there is a ‘?’ at the beginning of the list of query params, and then they’re separated by ‘&’, so in any case the ‘?’ should not be at the end of the param.


A ‘?’ in a property is short form for ‘required: false’.


Hi, in RAML 1.0 (since RC2) its possible to have a question mark being part of the property name. That’s why you see that behaviour. The question mark only gets recognized as part of the name when you explicitly define required.


Hi Christian,

Thanks for your response. If that’s the case then the parser is correct. I wonder who would intentionally want a question mark as part of a property name. Maybe property names with UTF-8 symbols might require ‘?’, but I can’t imagine occidental alphabet use cases.



Agree :slight_smile: