ramses-tech / ramses

RAML + Elasticsearch / Postgres / Mongodb / Your Data Store™ + Pyramid = RESTful API
http://ramses.tech
Apache License 2.0
303 stars 29 forks source link

response body cannot have a array #117

Closed kalyankuramana closed 8 years ago

kalyankuramana commented 8 years ago

{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "array", "items": { "type": "object", "properties": { "orderId": { "type": "integer" } } } }

ramses not supporting these type of schemas

jstoiko commented 8 years ago

there is a chapter in the doc about list fieds that might be helpful: https://ramses.readthedocs.io/en/stable/fields.html#list-fields

jstoiko commented 8 years ago

you can try different "item_type" like in the example below:

(...)
"_db_settings": {
        "type": "list",
        "item_type": "dict"
    }
(...)