pyraml-parser icon indicating copy to clipboard operation
pyraml-parser copied to clipboard

mediaType support

Open alvassin opened this issue 8 years ago • 0 comments

Hello.

Please add mediaType support. It is allowed to specify mediaType only once at top level, and then omit it in responses body.

Currently this valid raml will fail with error:

pyraml.model.ValidationError: {'body': "test' expected to be <class 'pyraml.entities.RamlBody'> or dict"}

My valid raml:

#%RAML 0.8
title: Test API
baseUri: http://localhost:8001
mediaType: application/json

schemas:
  - test: !include schemas/test.json

/resources:
  get:
    description: Get all resources
    responses:
      200:
        body:
            schema: test

alvassin avatar Apr 11 '16 11:04 alvassin