Mule 您能在RAML中引用示例和模式吗
我正在使用Mule 4和Anypoint Studio 7 我目前正在编写RAML,并希望向RAML中的资源添加模式(验证)和示例(API控制台中的模拟响应),但我得到了一个一般性错误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 是否可以对资源同时使用模式和示例 谢谢这里
#%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
您需要确保正确定义了类型和示例。您可以添加。但是你犯了什么错误?