Closed matiasb closed 8 years ago
According to spec [1], URI parameters are defined by parametrizing the path and the use of uriParameters property is optional. However, ramlfications won't list a URI parameter unless it is listed in the uriParameters property:
>>> import ramlfications >>> RAML = """ ... #%RAML 0.8 ... /something/{name}: ... get: ... """ >>> loader = ramlfications.loads(RAML) >>> config = setup_config(None) >>> raml_obj = ramlfications.parse_raml(loader, config) >>> raml_obj.resources[0].uri_params >>>
but
>>> import ramlfications >>> RAML = """ ... #%RAML 0.8 ... /something/{name}: ... uriParameters: ... name: ... get: ... """ >>> loader = ramlfications.loads(RAML) >>> config = setup_config(None) >>> raml_obj = ramlfications.parse_raml(loader, config) >>> raml_obj.resources[0].uri_params [URIParameter(name='name')] >>>
[1] http://raml.org/spec.html#uri-parameters
Ah thank you for reporting - I'll take a look into this. I do agree that actually defining uriParameters is optional.
Fixed in #75 (hopefully!)
According to spec [1], URI parameters are defined by parametrizing the path and the use of uriParameters property is optional. However, ramlfications won't list a URI parameter unless it is listed in the uriParameters property:
but
[1] http://raml.org/spec.html#uri-parameters