我使用的骡子4和Anypoint工作室7。
我目前正在写肾错构瘤并期待架构(生效)和实例(在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
你需要确保你已经正确定义的类型和实例。