Open buhman opened 8 years ago
In raml that looks like this:
post: body: application/json: ...
When traversing that resource in the raw raml, a response type could be accessed like this:
mime_type = node['body']['application/json']
In the representation in ramlfications, equivalent access would look like this:
mime_type = [m for m in node.body if m.mime_type == 'application/json'][0]
This also applies to pretty much anything, including RootNode.resources.
RootNode.resources
What do you think about changing the pattern to something like:
{ 'application/json': Body() }
In raml that looks like this:
When traversing that resource in the raw raml, a response type could be accessed like this:
In the representation in ramlfications, equivalent access would look like this:
This also applies to pretty much anything, including
RootNode.resources
.What do you think about changing the pattern to something like: