Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/sql-server-2008/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mule 您能在RAML中引用示例和模式吗_Mule_Anypoint Studio_Raml - Fatal编程技术网

Mule 您能在RAML中引用示例和模式吗

Mule 您能在RAML中引用示例和模式吗,mule,anypoint-studio,raml,Mule,Anypoint Studio,Raml,我正在使用Mule 4和Anypoint Studio 7 我目前正在编写RAML,并希望向RAML中的资源添加模式(验证)和示例(API控制台中的模拟响应),但我得到了一个一般性错误 #%RAML 1.0 Trait responses: 200: body: application/json: schema: mySchema example: example/mySchema.json 是否可以对资源同时使用模式和示例 谢谢这里

我正在使用Mule 4和Anypoint Studio 7

我目前正在编写RAML,并希望向RAML中的资源添加模式(验证)和示例(API控制台中的模拟响应),但我得到了一个一般性错误

#%RAML 1.0 Trait
responses: 
  200:
    body: 
      application/json:
        schema: mySchema
        example: example/mySchema.json
是否可以对资源同时使用模式和示例

谢谢这里是一个例子

#%RAML 1.0
version: v1
title: something.raml

mediaType:
  application/json

uses:
  ResultsRS: path/StudentResultRS.raml


/students:
    /results/get:
      post:
        description: get the results of a student
          body:
            application/json:
              type: ResultsRS.tudentResultRS.raml
              examples: !include path/examples/studentresults_RS.raml

您需要确保正确定义了类型和示例。

您可以添加。但是你犯了什么错误?