farolfo / raml-server

run a mocked server JUST based on a RAML API's definition .. zero coding
MIT License
161 stars 30 forks source link

Error parsing RAML with included raml schemas #23

Open toorosan opened 6 years ago

toorosan commented 6 years ago

Error got from cli:

# raml-server api.raml
Error parsing: while validating body
schema must be a string
  in "api.raml", line 28, column 13:
                schema: !include responses/BaseOk ...

api.raml file contents:

#%RAML 0.8
title: test for Error parsing
version: v1
protocols: [HTTP, HTTPS]

baseUri: http://{host}:{port}/{version}
baseUriParameters:
  host:
    displayName: Domain name / IP address
    type: string
    default: localhost
  port:
    displayName: Port
    type: string
    default: 80

mediaType: application/json

/:
  get:
    description: "Base request"
    responses:
      200:
        description: "Base request description"
        body:
          application/json:
            schema: !include responses/BaseOk.raml

responses/BaseOk.raml file contents:

description: "Base OK result."